Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
commit
0befb25739
@ -0,0 +1,238 @@
|
|||||||
|
#include "ergodox_ez.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
#define UNIC 3 // unicode entry layer
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ESC | 1! | 2@ | 3# | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | -_ | += | BkSp |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | { | | } | Y | U | I | O | P | |\ |
|
||||||
|
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
|
||||||
|
* | Win | A | S | D | F | G |------| |------| H | J | K | L | :; | '" |
|
||||||
|
* |--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Alt | X | C | V | B | | | | N | M | , | . | Alt | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |LCtrl | COPY | PASTE| Left | Right| | Down | Up |Hyper | `~ | RCtrl |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* Hyper = Ctrl+Super+Alt+Shift | ~L3 | F5 | | F2 | ~L2 |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | PgUp | | Ins | | |
|
||||||
|
* | Enter| BkSp |------| |------| ~L1 |Space |
|
||||||
|
* | | | PgDn | | 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
|
||||||
|
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, ALT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_HOME,
|
||||||
|
KC_LCTRL, LCTL(KC_C), LCTL(KC_V), KC_LEFT,KC_RGHT,
|
||||||
|
KC_FN3, KC_F5,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_ENT,KC_BSPC,KC_PGDN,
|
||||||
|
// right hand
|
||||||
|
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
|
KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,
|
||||||
|
KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_DOWN,KC_UP, ALL_T(KC_NO),KC_GRV, KC_RCTRL,
|
||||||
|
KC_F2, KC_FN2,
|
||||||
|
KC_INS,
|
||||||
|
KC_DELT,KC_FN1, KC_SPC
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |PrintScr|
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | £ | | | | | | . | 0 | = |Alt+F4|
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ↑ ,-------------. ,-------------.
|
||||||
|
* THERE! | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* CAD = Ctrl + Alt + Delete | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | CAD | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||||
|
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,M(3),KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,
|
||||||
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||||
|
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, LALT(KC_F4),
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
LCTL(LALT(KC_DEL)), KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | TEENSY | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | Lclk | Rclk | |VolDn |VolUp | 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_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_WBAK
|
||||||
|
),
|
||||||
|
/* Keymap 3: Unicode Entry
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Alt | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | + | + | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Alt | | | E | | | | | | | 7 | 8 | 9 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Alt | A | | D | F | |------| |------| | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Alt | | | C | | B | | | | | 1 | 2 | 3 | + | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | Alt | Alt | Alt | | | | 0 | 0 | 0 | + | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* WINDOWS ONLY SETUP!! | ~L3 | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | Alt | Alt |------| |------| Alt | Alt |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[UNIC] = KEYMAP( // layer 3 : Unicode Entry
|
||||||
|
// left hand
|
||||||
|
KC_LALT, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6,
|
||||||
|
KC_LALT, KC_TRNS, KC_TRNS, KC_E, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_LALT, KC_A, KC_TRNS, KC_D, KC_F, KC_TRNS,
|
||||||
|
KC_LALT, KC_TRNS, KC_TRNS, KC_C, KC_TRNS, KC_B, KC_TRNS,
|
||||||
|
KC_LALT, KC_LALT, KC_LALT, KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_LALT,KC_LALT, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS,KC_PPLS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_TRNS,
|
||||||
|
KC_P0, KC_P0, KC_P0, KC_PPLS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_LALT, KC_LALT
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media)
|
||||||
|
[3] = ACTION_LAYER_TAP_TOGGLE(UNIC) // FN3 - Momentary Layer 3 (Unicode entry)
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
case 3: // this would trigger when you hit a key mapped as M(3)
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( I(255), D(LALT), T(P1), T(P5), T(P6), U(LALT), END );
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
case 3:
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,179 @@
|
|||||||
|
Englishman in New York
|
||||||
|
===========================
|
||||||
|
|
||||||
|
:microphone: :tea:
|
||||||
|
|
||||||
|
About
|
||||||
|
------
|
||||||
|
|
||||||
|
After using the massdrop configurator to get the basics, I wanted to add a
|
||||||
|
little extra to my ergodox. Notably the Hyper hotkey, the press and hold,
|
||||||
|
and a way to have my beloved £ :pound: symbol available<sup>[1](#unicode)</sup>. Why not switch to a GB
|
||||||
|
layout? Well the computers I use are US keymap'd and I can't always change
|
||||||
|
that. Plus I've got used to 2/@ and 3/# and moving to the ergodox was hard
|
||||||
|
enough. :sweat_smile:
|
||||||
|
|
||||||
|
I started from the default and edited from there as I needed. It's somewhat
|
||||||
|
similar to a regular layout, particularly R1 and shift/controls. I ended up
|
||||||
|
with a few keys that were blank, so I'm testing out some shortcuts. Alt+F4 for
|
||||||
|
quitting things in Windows, is one example, but I felt it was better placed on
|
||||||
|
the 1st layer - in case of fat fingers.
|
||||||
|
|
||||||
|
Layout
|
||||||
|
-------
|
||||||
|
|
||||||
|
![Layout](rl-layout.jpg "Isn't it lovely")
|
||||||
|
|
||||||
|
### Base Layer
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ESC | 1! | 2@ | 3# | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | -_ | += | BkSp |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | E | R | T | { | | } | Y | U | I | O | P | |\ |
|
||||||
|
|--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
|
||||||
|
| Win | A | S | D | F | G |------| |------| H | J | K | L | :; | '" |
|
||||||
|
|--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------|
|
||||||
|
| LShift |Z/Alt | X | C | V | B | | | | N | M | , | . | Alt | RShift |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
|LCtrl | COPY | PASTE| Left | Right| | Down | Up |Hyper | `~ | RCtrl |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
Hyper = Ctrl+Super+Alt+Shift | ~L3 | F5 | | F2 | ~L2 |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | PgUp | | Ins | | |
|
||||||
|
| Enter| BkSp |------| |------| ~L1 |Space |
|
||||||
|
| | | PgDn | | Del | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symbol Layer
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |PrintScr|
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | £ | | | | | | . | 0 | = |Alt+F4|
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
↑ ,-------------. ,-------------.
|
||||||
|
THERE! | | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
CAD = Ctrl + Alt + Delete | | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | CAD | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
### Media Layer
|
||||||
|
|
||||||
|
Not touched this, not used either.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| TEENSY | | | | | | | | | | | | | | |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| | | | MsUp | | | | | | | | | | | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | | | | | | | | | | | Prev | Next | | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | Lclk | Rclk | |VolDn |VolUp | Mute | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | |Brwser|
|
||||||
|
| | |------| |------| |Back |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
### Unicode Layer
|
||||||
|
|
||||||
|
Used to enter/test unicode input on Windows. All numbers are numpad keys.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| Alt | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | + | + | |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| Alt | | | E | | | | | | | 7 | 8 | 9 | + | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| Alt | A | | D | F | |------| |------| | 4 | 5 | 6 | + | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| Alt | | | C | | B | | | | | 1 | 2 | 3 | + | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| Alt | Alt | Alt | | | | 0 | 0 | 0 | + | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
WINDOWS ONLY SETUP!! | ~L3 | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| Alt | Alt |------| |------| Alt | Alt |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
------
|
||||||
|
|
||||||
|
~L1 / L2 / L3 will momentarily switch to a layer if held and another key is pressed.
|
||||||
|
If pressed and released will remain on layer until pressed again.
|
||||||
|
|
||||||
|
### Unicode
|
||||||
|
|
||||||
|
This layout is for Windows only. To enter a character Press and Hold Alt, type + and hex code then release Alt.
|
||||||
|
|
||||||
|
Changelog
|
||||||
|
-----------
|
||||||
|
|
||||||
|
### [0.2.1] - 2016-04-05
|
||||||
|
|
||||||
|
* Changed £ to alt code in Windows. Windows sucks at unicode.
|
||||||
|
|
||||||
|
### [0.2.0] - 2016-03-27
|
||||||
|
|
||||||
|
* Added unicode layer
|
||||||
|
* Moved Copy/Paste to left hand side
|
||||||
|
* Switched Enter and Space (again)
|
||||||
|
* Added L3 (unicode layer) toggle
|
||||||
|
* Removed Press and Hold for Alt on right hand size (/)
|
||||||
|
* Swapped Volume Up/Down to match arrows
|
||||||
|
* Tried fixing £ macro
|
||||||
|
* Removed * in the matrix function things (upstream change)
|
||||||
|
|
||||||
|
### [0.1.1] - 2016-03-23
|
||||||
|
|
||||||
|
* Changed £ input to a macro
|
||||||
|
|
||||||
|
|
||||||
|
### [0.1.0] - 2016-03-22
|
||||||
|
|
||||||
|
After actually using the keyboard, I've made some changes:
|
||||||
|
|
||||||
|
* Swapped Enter and Space
|
||||||
|
* Moved backspace to thumb keys (top right still remains)
|
||||||
|
* Added Ctrl+Alt+Delete
|
||||||
|
* Added Teensy Reset on 2nd layer
|
||||||
|
* Switched Up and Down
|
||||||
|
* Changed copy/paste to be Ctrl+c and Ctrl+v as KC_COPY/PASTE didn't work (in Windows)
|
||||||
|
* Moved ~L2 to replace +L1 after learning how the function works (notes above)
|
||||||
|
* Hopefully fixed GBP symbol (unicode enabled in MakeFile)
|
||||||
|
|
||||||
|
### [0.0.1] - 2016-03-21
|
||||||
|
|
||||||
|
First version
|
||||||
|
|
||||||
|
|
||||||
|
Issues
|
||||||
|
-------
|
||||||
|
|
||||||
|
Space for feedback and notes for future improvements
|
||||||
|
|
||||||
|
----
|
||||||
|
<sup><a name="unicode">1</a></sup>: For Windows only, and you have to edit the [registry](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input).
|
Binary file not shown.
After Width: | Height: | Size: 814 KiB |
Binary file not shown.
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 92 KiB |
@ -1,9 +1,63 @@
|
|||||||
# The Ordinary Layout, a familiar and powerful layout
|
# The Ordinary Layout, a familiar and powerful layout #
|
||||||
|
|
||||||
The Ordinary Layout is intended to be unremarkably mundane and remarkably useful. This layout maintains most key positions from common QWERTY keyboards and features enhanced Symbol and Media layers compared to the default Ergodox EZ layout.
|
The Ordinary Layout is intended to be unremarkably mundane and remarkably useful. This layout maintains most key positions from common QWERTY keyboards, and it features enhanced Symbol and Media layers compared to the default Ergodox EZ layout.
|
||||||
|
|
||||||
Full details about the rationale behind this layout [are available](http://nicholas.rinard.us/2016/03/ergodox-ez-layout.html).
|
The Ordinary Layout is supposed to look mostly like a normal keyboard, except in the ways that the Ergodox key arrangement is unique. The thumbs are responsible for space, enter, plus both forward and backward delete; with only a couple exceptions, all other keys are in the same place they are found on traditional keyboards.
|
||||||
|
|
||||||
|
Nicholas Keene
|
||||||
|
ordinarylayout@nicholaskeene.com
|
||||||
|
no rights reserved, use for any purposes, credit me if you are a nice person
|
||||||
|
|
||||||
|
## The Base Layout ##
|
||||||
|
|
||||||
|
* The yellow keys are text navigation and manipulation
|
||||||
|
* The dark blue keys are shift keys: case shift (traditional shift), symbol shift, and media shift
|
||||||
|
* The light blue keys are modifiers: traditional Control, Option, and C ommand keys, plus Hyper and Meh
|
||||||
|
* The two green keys, tab and tilde, are in the typical places to ease use of the Application Switcher
|
||||||
|
* The red keys is Escape, one of the few buttons which is in an atypical position
|
||||||
|
|
||||||
![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 layouts. They are in the regular order, with the addition of Hyper and Meh keys. The shift key (case shift) is in the prevalent location. The primo slots usually wasted on Caps Lock and Enter are instead used for the Symbol Shift key which promotes use of the Symbols layer. On the right side of the layout, the Symbol and Media shift keys also double as character keys -- quote and backslash, respectively -- so that touch typists can continue to find those punctuation marks in the right place.
|
||||||
|
|
||||||
|
Other than the yellow 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.
|
||||||
|
|
||||||
|
The four big yellow 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 there 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 Layout ##
|
||||||
|
|
||||||
|
* The periwinkle keys are the eponymous symbols
|
||||||
|
* The gray keys are F-Keys
|
||||||
|
* The green keys are a proper number pad
|
||||||
|
* The red Escape key is found in the "right" location on this layer
|
||||||
|
* The yellow keys are the *reverse* of the yellow keys on the base layer
|
||||||
|
* The dark blue Media key means that the Media layer is accessible with the left hand
|
||||||
|
|
||||||
![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 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. This layout also has an Enter key, and importantly the key codes emitted by this number pad are *number pad specific key codes*, not regular keyboard key codes. Some software distinguishes keypad codes so users now have access to a fully realized number pad when using The Ordinary Layout.
|
||||||
|
|
||||||
|
The Escape key's true home is in the top left corner of the keyboard, so on this layer it can be found there. And on the Symbols layer, the Tab key switches to become a Media key, so press Symbols then Media to access the Media layer using the left hand.
|
||||||
|
|
||||||
|
Finally, consider the yellow text-nav keys. In the Symbols layer, these are *reversed* from the base layer, with most keys mirrored, but the Delete keys shifted to maintain the directional significance of their arrangement. 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 yellow keys, and Enter is right where it should be.
|
||||||
|
|
||||||
|
## The Media Layout ##
|
||||||
|
|
||||||
|
* The light turquoise keys move the mouse or the text cursor
|
||||||
|
* The dark turquoise keys scroll
|
||||||
|
* The light purple keys signal Web and Audio applications
|
||||||
|
* The dark purple keys signal the operating system
|
||||||
|
* The red Escape key is, again, found in the "right" location
|
||||||
|
|
||||||
![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 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.
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
# The Default Planck Layout
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QW] = { /* Qwerty */
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_CM] = { /* Colemak */
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_DV] = { /* Dvorak */
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
|
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_RS] = { /* 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
[_LW] = { /* 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||||
|
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,117 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "preonic.h"
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
#include "backlight.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QW 0
|
||||||
|
#define _CM 1
|
||||||
|
#define _DV 2
|
||||||
|
#define _LW 3
|
||||||
|
#define _RS 4
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QW] = { /* Qwerty */
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_CM] = { /* Colemak */
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_DV] = { /* Dvorak */
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
|
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_RS] = { /* 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
[_LW] = { /* LOWER */
|
||||||
|
{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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||||
|
{KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||||
|
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Guitar Notes
|
||||||
|
#define N_E 13180.5
|
||||||
|
#define N_B 9870.8
|
||||||
|
#define N_G 15680.0
|
||||||
|
#define N_D 11740.7
|
||||||
|
#define N_E 13180.5
|
||||||
|
|
||||||
|
float start_up[][2] = {
|
||||||
|
{ N_E, 500 },
|
||||||
|
{ 0, 50 },
|
||||||
|
{ N_E, 500 },
|
||||||
|
{ 0, 50 },
|
||||||
|
{ N_E, 500 },
|
||||||
|
{ 0, 50 },
|
||||||
|
{ N_B, 500 },
|
||||||
|
{ 0, 50 },
|
||||||
|
{ N_E, 1000 },
|
||||||
|
{ 0, 50 },
|
||||||
|
{ N_G, 1500 },
|
||||||
|
{ 0, 50 },
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
init_notes();
|
||||||
|
play_notes(&start_up, 12, false);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void process_action_user(keyrecord_t *record) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
if (record->event.pressed) {
|
||||||
|
float keypress[][2] = {
|
||||||
|
{440.0*pow(2.0,(record->event.key.col*7)/12.0), 600}
|
||||||
|
};
|
||||||
|
play_notes(&keypress, 1, false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
Loading…
Reference in New Issue