Merge pull request #310 from nrrkeene/master
Lock layers by pressing both shift keys
@ -4,28 +4,33 @@
|
||||
#include "action_layer.h"
|
||||
#include "action_util.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols layer
|
||||
#define MDIA 2 // media layer
|
||||
#define LOCK 3 // shift-lock layer
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols layer
|
||||
#define MDIA 2 // media layer
|
||||
#define SPEC 3 // special layer
|
||||
|
||||
#define LSymb 0 // left symbol-shift key
|
||||
#define LMdia 1 // left media-shift key
|
||||
#define LLock 2 // left shift-lock key
|
||||
#define RSymb 3 // right symbol-shift key
|
||||
#define RMdia 4 // right media-shift key
|
||||
#define RLock 5 // right shift-lock key
|
||||
#define LCaps 10 // left caps-shift key
|
||||
#define LSymb 11 // left symbol-shift key
|
||||
#define LMdia 12 // left media-shift key
|
||||
#define LSpec 13 // left special-shift key
|
||||
#define RCaps 14 // right caps-shift key
|
||||
#define RSymb 15 // right symbol-shift key
|
||||
#define RMdia 16 // right media-shift key
|
||||
#define RSpec 17 // right special-shift key
|
||||
|
||||
#define MUL 6 // mouse up left
|
||||
#define MUR 7 // mouse up right
|
||||
#define MDL 8 // mouse down left
|
||||
#define MDR 9 // mouse down right
|
||||
#define MUL 20 // mouse up left
|
||||
#define MUR 21 // mouse up right
|
||||
#define MDL 22 // mouse down left
|
||||
#define MDR 23 // mouse down right
|
||||
|
||||
/*
|
||||
* The Ordinary Layout for the Ergodox EZ keyboard, v3.14
|
||||
* The Ordinary Layout for the Ergodox EZ keyboard, v4
|
||||
*
|
||||
* Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
||||
*
|
||||
* No rights reserved. This software is in the public domain.
|
||||
* Credit me if you are friendly but if you're a jerk don't bother.
|
||||
*
|
||||
* Details: readme.md
|
||||
* https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary
|
||||
*/
|
||||
@ -34,40 +39,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/******* Base Layer ********************************************************************************************************
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | Lock `~ | 1 | 2 | 3 | 4 | 5 | ESC | | - | 6 | 7 | 8 | 9 | 0 | =+ Lock |
|
||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||
* | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media |
|
||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||
* | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol |
|
||||
* |-----------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+-----------|
|
||||
* | LShift | Z | X | C | V | B | -Tab | | | N | M | , | . | / | RShift |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Home | End | | Left | Right|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | PgUp | | Up | | |
|
||||
* |Backsp| Del |------| |------| Enter| Space|
|
||||
* | | | PgDn | | Down | | |
|
||||
* `--------------------' `--------------------'
|
||||
* ,------------------------------------------------------. ,------------------------------------------------------.
|
||||
* | Special `~ | 1 | 2 | 3 | 4 | 5 | ESC | | - | 6 | 7 | 8 | 9 | 0 | =+ Special |
|
||||
* |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------|
|
||||
* | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media |
|
||||
* |------------+------+------+------+------+------| | | |------+------+------+------+------+------------|
|
||||
* | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol |
|
||||
* |------------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+------------|
|
||||
* | Capitals | Z | X | C | V | B | -Tab | | | N | M | , | . | / | Capitals |
|
||||
* `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------'
|
||||
* | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Home | End | | Left | Right|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | PgUp | | Up | | |
|
||||
* |Backsp| Del |------| |------| Enter| Space|
|
||||
* | | | PgDn | | Down | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
F(LLock) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC
|
||||
F(LSpec),KC_1,KC_2,KC_3 ,KC_4 ,KC_5 ,KC_ESC
|
||||
,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
|
||||
,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
||||
,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB)
|
||||
,M(LCaps) ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB)
|
||||
,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT,KC_LGUI
|
||||
,KC_HOME,KC_END
|
||||
,KC_PGUP
|
||||
,KC_BSPC,KC_DEL ,KC_PGDN
|
||||
// right hand
|
||||
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RLock)
|
||||
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec)
|
||||
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia)
|
||||
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb)
|
||||
,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT
|
||||
,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,M(RCaps)
|
||||
,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL
|
||||
,KC_LEFT ,KC_RGHT
|
||||
,KC_UP
|
||||
@ -158,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
,KC_VOLD ,KC_MSTP ,KC_MPLY
|
||||
),
|
||||
|
||||
/******* Lock Layer ********************************************************************************************************
|
||||
/******* Special Layer *****************************************************************************************************
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | | Esc | | | | | | | | | | | | Bspc | |
|
||||
@ -167,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||
* | Caps LOCK | | | | | | | | | | | | | | Caps LOCK |
|
||||
* | | | | | | | | | | | | | | | RShift |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
@ -179,12 +184,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[LOCK] = KEYMAP(
|
||||
[SPEC] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_CAPS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
@ -194,7 +199,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_BSPC ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_CAPS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_RSFT
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
@ -204,91 +209,118 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
// the six faux shift keys are implemented as macro taps
|
||||
[LSymb] = ACTION_MACRO_TAP(LSymb)
|
||||
// the faux shift keys are implemented as macro taps
|
||||
[LCaps] = ACTION_MACRO_TAP(LCaps)
|
||||
,[LSymb] = ACTION_MACRO_TAP(LSymb)
|
||||
,[LMdia] = ACTION_MACRO_TAP(LMdia)
|
||||
,[LLock] = ACTION_MACRO_TAP(LLock)
|
||||
,[LSpec] = ACTION_MACRO_TAP(LSpec)
|
||||
,[RCaps] = ACTION_MACRO_TAP(RCaps)
|
||||
,[RSymb] = ACTION_MACRO_TAP(RSymb)
|
||||
,[RMdia] = ACTION_MACRO_TAP(RMdia)
|
||||
,[RLock] = ACTION_MACRO_TAP(RLock)
|
||||
,[RSpec] = ACTION_MACRO_TAP(RSpec)
|
||||
};
|
||||
|
||||
uint16_t symb_shift = 0; // there are two shift keys for each layer, and two lock
|
||||
uint16_t mdia_shift = 0; // keys; we increment a counter for each key pressed and
|
||||
uint16_t shift_lock = 0; // decrement when released.
|
||||
uint16_t caps_shift = 0;
|
||||
uint16_t symb_shift = 0;
|
||||
uint16_t mdia_shift = 0;
|
||||
|
||||
bool symb_lock = false; // when shift-lock is used in conjunction with a shift
|
||||
bool mdia_lock = false; // key the lock flag is toggled
|
||||
bool symb_lock = false;
|
||||
bool mdia_lock = false;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
// shift and lock between layers
|
||||
// There are two shift keys for each layer so we increment a layer_shift var when one
|
||||
// is pressed and decrement when one is released. If both are pressed at the same time
|
||||
// then the layer is locked (or unlocked). The shift counts are bound between 0 and 2
|
||||
// only because sometimes rapid pressing led to irregular events; this way the states
|
||||
// are self healing during use.
|
||||
|
||||
case LCaps: // both caps-shift keys trigger Left Shift
|
||||
case RCaps: // so they don't interfere with the magic combo
|
||||
if (record->event.pressed && !record->tap.count) {
|
||||
if(++caps_shift > 2) caps_shift = 2;
|
||||
if(caps_shift == 2) {
|
||||
register_code(KC_CAPS);
|
||||
unregister_code(KC_CAPS);
|
||||
} else if(caps_shift == 1) {
|
||||
register_code(KC_LSFT);
|
||||
}
|
||||
} else {
|
||||
if(--caps_shift < 0) caps_shift = 0;
|
||||
if(caps_shift == 0) unregister_code(KC_LSFT);
|
||||
}
|
||||
break;
|
||||
|
||||
case LSymb:
|
||||
if (record->event.pressed) {
|
||||
symb_shift++;
|
||||
if(shift_lock) symb_lock = !symb_lock;
|
||||
layer_on(SYMB);
|
||||
if(++symb_shift > 2) symb_shift = 2;
|
||||
if(symb_shift == 2) {
|
||||
symb_lock = !symb_lock;
|
||||
} else if(symb_shift == 1) {
|
||||
layer_on(SYMB);
|
||||
}
|
||||
} else {
|
||||
symb_shift--;
|
||||
if((!symb_shift) && (!symb_lock)) layer_off(SYMB);
|
||||
if(--symb_shift < 0) symb_shift = 0;
|
||||
if((symb_shift == 0) && (!symb_lock)) layer_off(SYMB);
|
||||
}
|
||||
break;
|
||||
|
||||
case LMdia:
|
||||
if (record->event.pressed) {
|
||||
if (record->tap.count && !shift_lock) {
|
||||
if (record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
||||
register_code(KC_TAB);
|
||||
} else {
|
||||
mdia_shift++;
|
||||
if(shift_lock) mdia_lock = !mdia_lock;
|
||||
layer_on(MDIA);
|
||||
if(++mdia_shift > 2) mdia_shift = 2;
|
||||
if(mdia_shift == 2) {
|
||||
mdia_lock = !mdia_lock;
|
||||
} else if(mdia_shift == 1) {
|
||||
layer_on(MDIA);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(record->tap.count && !shift_lock) {
|
||||
if(record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
||||
unregister_code(KC_TAB);
|
||||
} else {
|
||||
mdia_shift--;
|
||||
if(--mdia_shift < 0) mdia_shift = 0;
|
||||
if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case LLock:
|
||||
case LSpec:
|
||||
if (record->event.pressed) {
|
||||
shift_lock++;
|
||||
if(symb_shift) symb_lock = !symb_lock;
|
||||
if(mdia_shift) mdia_lock = !mdia_lock;
|
||||
if(!record->tap.count && (keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))) {
|
||||
register_code(KC_CAPS);
|
||||
unregister_code(KC_CAPS);
|
||||
}
|
||||
layer_on(LOCK);
|
||||
} else {
|
||||
if(record->tap.count && !record->tap.interrupted && !symb_shift && !mdia_shift) {
|
||||
if (record->tap.count && !record->tap.interrupted) {
|
||||
register_code(KC_GRV);
|
||||
unregister_code(KC_GRV);
|
||||
} else {
|
||||
layer_on(SPEC);
|
||||
}
|
||||
} else {
|
||||
if(record->tap.count && !record->tap.interrupted) {
|
||||
unregister_code(KC_GRV);
|
||||
} else {
|
||||
layer_off(SPEC);
|
||||
}
|
||||
shift_lock--;
|
||||
if(!shift_lock) layer_off(LOCK);
|
||||
}
|
||||
break;
|
||||
|
||||
case RSymb:
|
||||
if (record->event.pressed) {
|
||||
if (record->tap.count && !shift_lock) {
|
||||
if (record->tap.count && (!symb_shift) && (!symb_lock)) {
|
||||
register_code(KC_QUOT);
|
||||
} else {
|
||||
symb_shift++;
|
||||
if(shift_lock) symb_lock = !symb_lock;
|
||||
layer_on(SYMB);
|
||||
if(++symb_shift > 2) symb_shift = 2;
|
||||
if(symb_shift == 2) {
|
||||
symb_lock = !symb_lock;
|
||||
} else if(symb_shift == 1) {
|
||||
layer_on(SYMB);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(record->tap.count && !shift_lock) {
|
||||
if(record->tap.count && symb_shift == 0) {
|
||||
unregister_code(KC_QUOT);
|
||||
} else {
|
||||
symb_shift--;
|
||||
if(--symb_shift < 0) symb_shift = 0;
|
||||
if((!symb_shift) && (!symb_lock)) layer_off(SYMB);
|
||||
}
|
||||
}
|
||||
@ -296,40 +328,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
|
||||
case RMdia:
|
||||
if (record->event.pressed) {
|
||||
if (record->tap.count && !shift_lock) {
|
||||
if (record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
||||
register_code(KC_BSLS);
|
||||
} else {
|
||||
mdia_shift++;
|
||||
if(shift_lock) mdia_lock = !mdia_lock;
|
||||
layer_on(MDIA);
|
||||
if(++mdia_shift > 2) mdia_shift = 2;
|
||||
if(mdia_shift == 2) {
|
||||
mdia_lock = !mdia_lock;
|
||||
} else if(mdia_shift == 1) {
|
||||
layer_on(MDIA);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(record->tap.count && !shift_lock) {
|
||||
if(record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
||||
unregister_code(KC_BSLS);
|
||||
} else {
|
||||
mdia_shift--;
|
||||
if(--mdia_shift < 0) mdia_shift = 0;
|
||||
if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case RLock:
|
||||
case RSpec:
|
||||
if (record->event.pressed) {
|
||||
shift_lock++;
|
||||
if(symb_shift) symb_lock = !symb_lock;
|
||||
if(mdia_shift) mdia_lock = !mdia_lock;
|
||||
if(!record->tap.count && (keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))) {
|
||||
register_code(KC_CAPS);
|
||||
unregister_code(KC_CAPS);
|
||||
}
|
||||
layer_on(LOCK);
|
||||
} else {
|
||||
if (record->tap.count && !record->tap.interrupted && !symb_shift && !mdia_shift) {
|
||||
if (record->tap.count && !record->tap.interrupted) {
|
||||
register_code(KC_EQL);
|
||||
unregister_code(KC_EQL);
|
||||
} else {
|
||||
layer_on(SPEC);
|
||||
}
|
||||
} else {
|
||||
if(record->tap.count && !record->tap.interrupted) {
|
||||
unregister_code(KC_EQL);
|
||||
} else {
|
||||
layer_off(SPEC);
|
||||
}
|
||||
shift_lock--;
|
||||
if(!shift_lock) layer_off(LOCK);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -399,7 +430,7 @@ void matrix_init_user(void) {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
// shift or caps lock turns on red light
|
||||
if((keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) || (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) {
|
||||
if(caps_shift || (keyboard_report->mods & MOD_BIT(KC_RSFT)) || (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) {
|
||||
ergodox_right_led_1_on();
|
||||
} else {
|
||||
ergodox_right_led_1_off();
|
||||
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
@ -1,7 +1,7 @@
|
||||
[{x:3.5},"#\n3",{x:10.5},"*\n8"],
|
||||
[{y:-0.875,x:2.5},"@\n2",{x:1},"$\n4",{x:8.5},"&\n7",{x:1},"(\n9"],
|
||||
[{y:-0.875,x:5.5},"%\n5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc"},"_\n\n\n\n\n\n-","^\n6"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n~\n\n\n\nLock\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#2277ff",w:1.5},"+\n\nShift\n\n\n\n=\nLock"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n~\n\n\n\nShift\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#2277ff",w:1.5},"+\n\nSpecial\n\n\n\n=\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#cccccc"},"E",{x:10.5},"I"],
|
||||
[{y:-0.875,x:2.5},"W",{x:1},"R",{x:8.5},"U",{x:1},"O"],
|
||||
[{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"],
|
||||
@ -14,7 +14,7 @@
|
||||
[{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"],
|
||||
[{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."],
|
||||
[{y:-0.875,x:5.5},"B",{x:6.5},"N"],
|
||||
[{y:-0.875,c:"#2277ff",fa:[0,1,0,1,0,0,0],w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5,f:3},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5},"Option\n\n\nRAlt"],
|
||||
[{y:-0.875,x:2.5},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5},"Cmd\n\n\nSuper",{x:1},"Hyper"],
|
||||
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Ctrl\n\n\nRCtrl"],
|
||||
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
@ -1,7 +1,7 @@
|
||||
[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
|
||||
[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
|
||||
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc",a:7},"",{c:"#99de2a",a:4},"F16"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nShift\n\n\n\n\nLock"],
|
||||
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#737373",a:7},"",{c:"#99de2a",a:4},"F16"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
|
||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nUpLeft",{x:1},"Mouse\n\n\n\n\n\nUpRgt",{x:8.5,c:"#ffb063"},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
|
||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#e6e067"},"Print\n\n\n\n\n\nScreen"],
|
||||
@ -13,9 +13,9 @@
|
||||
[{y:-0.625,x:6.5,c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
|
||||
[{y:-0.75,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#ffb063"},"End",{x:1},"Page\n\n\n\n\n\nDown"],
|
||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Mute",{x:6.5,c:"#cccccc",a:7},""],
|
||||
[{y:-0.875,c:"#2277ff",a:4,fa:[0,1,0,0,0,0,0],w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#cccccc",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,fa:[0,1,0,1],w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#ffb063"},"Delete\n\n\nOption"],
|
||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Mute",{x:6.5,c:"#737373",a:7},""],
|
||||
[{y:-0.875,c:"#2277ff",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#ffb063",fa:[0,0,0,1]},"Delete\n\n\nOption"],
|
||||
[{y:-0.875,x:2.5,c:"#ff8500"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#ffb063"},"Insert\n\n\nCmd",{x:1,c:"#77aaff"},"Hyper"],
|
||||
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"],
|
||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ccbb00"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
|
||||
|
BIN
keyboard/ergodox_ez/keymaps/ordinary/ordinary-special.png
Normal file
After Width: | Height: | Size: 62 KiB |
27
keyboard/ergodox_ez/keymaps/ordinary/ordinary-special.txt
Normal file
@ -0,0 +1,27 @@
|
||||
[{x:3.5,a:7},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{c:"#ff4444",a:4},"Esc",{x:4.5,c:"#cccccc",a:7},"",""],
|
||||
[{y:-0.875,c:"#000000",t:"#ff0000",a:4,w:1.5},"Special\n\n\n\n\n\nShift",{c:"#ff4444",t:"#000000"},"Esc",{x:14.5,c:"#54d6de"},"Back\n\n\n\n\n\nspace",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{h:1.5},"",{x:4.5,h:1.5},"",""],
|
||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
|
||||
[{y:-0.375,x:3.5},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
|
||||
[{y:-0.625,x:6.5,h:1.5},"",{x:4.5,h:1.5},""],
|
||||
[{y:-0.75,x:3.5},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{c:"#2277ff",w:1.5},"RShift"],
|
||||
[{y:-0.375,x:3.5,c:"#cccccc"},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.75,x:0.5},"","",{x:14.5},"",""],
|
||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""],
|
||||
[{h:2},"",{h:2},"",""],
|
||||
[{x:2},""],
|
||||
[{r:-30,rx:13,y:-1,x:-3},"",""],
|
||||
[{x:-3},"",{h:2},"",{h:2},""],
|
||||
[{x:-3},""]
|
||||
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 101 KiB |
@ -1,7 +1,7 @@
|
||||
[{x:3.5,c:"#99de2a"},"F3",{x:10.5},"F8"],
|
||||
[{y:-0.875,x:2.5},"F2",{x:1},"F4",{x:8.5},"F7",{x:1},"F9"],
|
||||
[{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#bbddbb"},"_\n\n\n\n\n\n-",{c:"#99de2a"},"F6"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#2277ff",w:1.5},"\n\nShift\n\n\n\n\nLock"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#bbddbb"},"{",{x:10.5,c:"#89b087"},"8"],
|
||||
[{y:-0.875,x:2.5,c:"#bbddbb"},"@",{x:1},"}",{x:8.5,c:"#89b087"},"7",{x:1},"9"],
|
||||
[{y:-0.875,x:5.5,c:"#bbddbb"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"],
|
||||
@ -14,7 +14,7 @@
|
||||
[{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"],
|
||||
[{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"],
|
||||
[{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"],
|
||||
[{y:-0.875,c:"#2277ff",f2:1,w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#bbddbb"},"%",{x:14.5,c:"#89b087"},"-",{c:"#2277ff",fa:[0,1,0,1],w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"],
|
||||
[{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb"},"%",{x:14.5,c:"#89b087"},"-",{c:"#2277ff",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},".\n\n\nOption"],
|
||||
[{y:-0.875,x:2.5,c:"#77aaff"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0\n\n\nCmd",{x:1},"=\n\n\nHyper"],
|
||||
[{y:-0.75,x:0.5,c:"#77aaff"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+\n\n\nMeh","Enter\n\n\nCtrl"],
|
||||
@ -22,6 +22,6 @@
|
||||
[{h:2},"Space",{h:2},"Enter","Up"],
|
||||
[{x:2},"Down"],
|
||||
[{r:-30,rx:13,y:-1,x:-3},"Home","End"],
|
||||
[{x:-3},"Page\n\n\n\n\n\nUp",{f:3,h:2},"< Del\n\n\nBackspace",{f:3,h:2},"Del >\n\n\nDelete"],
|
||||
[{x:-3},"Page\n\n\n\n\n\nUp",{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete"],
|
||||
[{x:-3},"Page\n\n\n\n\n\nDown"]
|
||||
|
||||
|
@ -55,7 +55,7 @@ Finally, consider the turquoise text-nav keys. Here in the Symbols layer, these
|
||||
* The bright green keys are more F-keys
|
||||
* The dark yellow keys signal Web and Audio applications
|
||||
* The light yellow keys signal the operating system
|
||||
* The uncolored keys do nothing in case you bump them by accident
|
||||
* The dark gray keys do nothing in case you bump them by accident
|
||||
|
||||
![Ordinary media layout](ordinary-media.png)
|
||||
|
||||
@ -67,16 +67,37 @@ Alas, the yellow keys have at best spotty success with common software. Good luc
|
||||
|
||||
## Switching Between Layers ##
|
||||
|
||||
In addition to Symbols and Media the Ordinary Layout treats the Capitals as a logical layer. Each layer is accessed by a shift key on each edge of the keyboard and corresponds to one of the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active.
|
||||
In addition to Symbols and Media there is the Capitals layer which is exactly the same as pressing the shift key. Each layer is accessed by a shift key on each edge of the keyboard and corresponds to one of the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active.
|
||||
|
||||
Shift buttons work in the expected way: press them and all of the keys switch to that layer; release them and the keys switch back to the base layer. Lock layers using the Shift key in conjunction with the Shift Lock key. For instance, the widely and rightly loathed Caps Lock is engaged by pressing the Shift Lock button then Capitals Shift. Or, hold down the Shift key and press the Shift Lock key; it works either way. All the Shift keys work this way.
|
||||
Shift buttons work in the expected way: press them and all of the keys switch to that layer; release them and the keys switch back to the base layer. If you press both of a pair of shift keys, the layer will lock on until you press both shift keys again. For instance, the widely and rightly loathed Caps Lock is engaged by pressing both Capitals Shift buttons. All the Shift keys work this way.
|
||||
|
||||
Multiple layers can be turned on at once but only one controls the keyboard. The order of the LEDs indicates the priority order: Media, Symbols, Capitals.
|
||||
Multiple layers can be turned on at once. The Capitals layer will affect characters on other layers to capitalize. Other layers, however, don't 'mix': Symbols blankets the base layout; Media blankets Symbols.
|
||||
|
||||
## Special Escape & Backspace Sequences ##
|
||||
## Special Sequences ##
|
||||
|
||||
In the Ordinary Layout, the most unsatisfying key location is the Escape key which rightly belongs segregated on its own way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one, in the top left corner, is home to the tilde (er, grave) which is commonly found there. The Escape key is important so it features prominently on the other top corner on the left side of the keyboard, and is always there in all layers. Nevertheless, alas, it isn't Ordinary to put the escape in that different corner!
|
||||
![Ordinary special layout](ordinary-special.png)
|
||||
|
||||
That tilde key has a second function as the Shift Lock key and that makes possible a special feature. To make this layout as Ordinary as possible, the Escape key can *also* be accessed by pressing Shift Lock then the 1 button right next to it. This easy gesture is a way to partially maintain the ease of flicking your wrist to the left and tapping Escape. This gesture works in all layers.
|
||||
### Escape ###
|
||||
|
||||
Finally, because the special Escape sequence is so natural and useful, on the top right corner of the Ergodox EZ you can do the same gesture with the 0 key to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times. These special sequences should feel unremarkably mundane but might prove to be remarkably useful.
|
||||
The One True Location for the Escape key is segregated way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one is home to the tilde (er, grave) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, whnich is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape.
|
||||
|
||||
The Ordinary layout offers as a consolation prize a Special sequence for Escape: Special Shift + 1. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers.
|
||||
|
||||
### Backspace ###
|
||||
|
||||
At the top right corner of the Ergodox EZ you can a gesture similar to the special Escape sequence, using the 0 key, to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times.
|
||||
|
||||
### RShift ###
|
||||
|
||||
The Ordinary Layout locks layers by pressing both of a pair of shift keys. This interferes with the QMK firmware magic sequence, which is LShift+RShift. To work around this, both of the Capitals Shift keys produce a *Left Shift* keystroke. If for some reason a person needs *Right Shift* they can find it by pressing a Special Shift key, then the Capitals Shift key on the right side of the keyboard.
|
||||
|
||||
****
|
||||
|
||||
The Ordinary Layout for the Ergodox EZ keyboard, v4
|
||||
|
||||
Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
||||
|
||||
No rights reserved. This software is in the public domain. Credit me if you are friendly but if you're a jerk don't bother.
|
||||
|
||||
Details: readme.md
|
||||
https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary
|
||||
|