1
0
Fork 0

Update the ergodox-ez/algernon keymap (#409)

Compared to the previous version, the following noteworthy changes have
been made to the keymap:

* The keyboard starts in NKRO mode, bootmagic and other things are
  disabled.
* A STENO layer was added, to be used with Plover.
* An experimental layout was added, something halfway between Dvorak and
  Capewell-Dvorak. A work in progress.
* `LEAD y` types \o/.
* Some keys on the BASE layer have been moved around:
  - `?` moved to the left pinky, left of `Q`.
  - `=` shifted one row down, but `F11` stayed where it was.
  - `-` on the left half was replaced by `Tab`.
  - `Tab`'s original position is taken by a `Media Next`/`Media Prev`
     key.
  - `:` now inputs `;` when shifted.
* `ESC` cancels the **HUN** layer too, not just modifiers.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy 2016-06-14 17:28:54 +02:00 committed by Jack Humbert
parent 4815b97add
commit 1d1ced53c7
11 changed files with 367 additions and 90 deletions

View file

@ -0,0 +1 @@
/compiled.hex

View file

@ -2,3 +2,7 @@ BOOTMAGIC_ENABLE=no
COMMAND_ENABLE=no COMMAND_ENABLE=no
SLEEP_LED_ENABLE=no SLEEP_LED_ENABLE=no
UNICODE_ENABLE=no UNICODE_ENABLE=no
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View file

@ -1,5 +1,5 @@
#ifndef CONFIG_USER_H #ifndef CONFIG_ALGERNON_H
#define CONFIG_USER_H 1 #define CONFIG_ALGERNON_H
#include "../../config.h" #include "../../config.h"
@ -24,4 +24,6 @@
#undef LEADER_TIMEOUT #undef LEADER_TIMEOUT
#define LEADER_TIMEOUT 1000 #define LEADER_TIMEOUT 1000
#define FORCE_NKRO
#endif #endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -9,77 +9,98 @@
#include "action_util.h" #include "action_util.h"
#include "mousekey.h" #include "mousekey.h"
#include "timer.h" #include "timer.h"
#include "keymap_plover.h"
/* Layers */ /* Layers */
#define BASE 0 // default layer enum {
#define APPSEL 1 // application select layer BASE = 0,
#define HUN 2 // Hungarian layer APPSEL,
#define EMACS 3 // (Spac)Emacs layer HUN,
#define OHLFT 4 // One-handed, left side EMACS,
#define OHRGT 5 // One-handed, right side OHLFT,
OHRGT,
PLVR,
EXPRM
};
/* Macros */ /* Macros */
#define A_GUI 0 // GUI magic enum {
#define A_ESC 44 // OSM-clearing ESC NONE = 0,
// Buttons that do extra stuff
A_GUI,
A_PLVR,
A_ESC,
A_MPN,
A_COLN,
#define A_MUL 1 // mouse up-left // Function / number keys
#define A_MUR 2 // mouse up-right KF_1, // 1, F1
#define A_MDL 3 // mouse down-left KF_2, // 2, F2
#define A_MDR 4 // mouse down-right KF_3, // ...
KF_4,
KF_5,
KF_6,
KF_7,
KF_8,
KF_9,
KF_10,
KF_11, // =, F11
#define AE_VIS 5 // Visual mode // Application select keys
#define AE_PSTDEL 6 // Paste/Delete APP_SLK, // Slack
#define AE_CPYC 7 // Copy/Cut APP_EMCS, // Emacs
#define AE_EMACS 8 // Emacs copy & paste mode APP_TERM, // Terminal
#define AE_TERM 9 // Terminal copy & paste mode APP_CHRM, // Chrome
#define AE_OTHER 10 // Other copy & paste mode APP_MSIC, // Music
#define AE_INS 11 // Insert mode
#define AE_OVR 12 // Overwrite mode
#define AE_APPND 13 // Append
#define HU_AA 14 // Á // Diagonal mouse movement
#define HU_OO 15 // Ó A_MUL,
#define HU_EE 16 // É A_MUR,
#define HU_UU 17 // Ú A_MDL,
#define HU_II 18 // Í A_MDR,
#define HU_OE 19 // Ö
#define HU_UE 20 // Ü
#define HU_OEE 21 // Ő
#define HU_UEE 22 // Ű
#define APP_SLK 23 // Slack // Emacs layer keys
#define APP_EMCS 24 // Emacs AE_VIS, // Visual mode
#define APP_TERM 25 // Terminal AE_PSTDEL, // Paste/Delete
#define APP_CHRM 26 // Chrome AE_CPYC, // Copy/Cut
#define APP_MSIC 27 // Music AE_EMACS, // Emacs copy & paste mode
AE_TERM, // Terminal copy & paste mode
AE_OTHER, // Other copy & paste mode
AE_INS, // Insert mode
AE_OVR, // Overwrite mode
AE_APPND, // Append
#define KF_1 28 // 1, F1 // Hungarian layer keys
#define KF_2 29 // 2, F2 HU_AA, // Á
#define KF_3 30 // ... HU_OO, // Ó
#define KF_4 31 HU_EE, // É
#define KF_5 32 HU_UU, // Ú
#define KF_6 33 HU_II, // Í
#define KF_7 34 HU_OE, // Ö
#define KF_8 35 HU_UE, // Ü
#define KF_9 36 HU_OEE, // Ő
#define KF_10 37 HU_UEE, // Ű
#define KF_11 38 // =, F11
#define OH_BSSPC 39 // One-handed layout specials
#define OH_ENTSFT 40 OH_BSSPC,
#define OH_BASE 41 OH_ENTSFT,
#define OH_LEFT 42 OH_BASE,
#define OH_RIGHT 43 OH_LEFT,
OH_RIGHT,
};
/* Fn keys */ /* Fn keys */
#define F_BSE 0
#define F_HUN 1 enum {
#define F_GUI 2 F_BSE = 0,
#define F_SFT 3 F_HUN,
#define F_ALT 4 F_GUI,
#define F_CTRL 5 F_SFT,
F_ALT,
F_CTRL
};
/* States & timers */ /* States & timers */
@ -117,13 +138,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base Layer /* Keymap 0: Base Layer
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Apps | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| = F11 | * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Tab | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | / | * | Next/Prev | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | = |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | - | A | O | E | U | I |------| |------| D | H | T | N | S | \ | * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | \ |
* |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------|
* | Play/Pause| ; | Q | J | K | X | | | | B | M | W | V | Z | Stop | * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | Home | End | Down | Up | : | | - | Left | Right| PgUp | PgDn | * | Home | End | Down | Up | : | | - | Left | Right| PgUp | PgDn |
* `-----------------------------------' `-----------------------------------' * `-----------------------------------' `-----------------------------------'
@ -137,19 +158,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[BASE] = KEYMAP( [BASE] = KEYMAP(
// left hand // left hand
KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),KC_APP KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
,KC_TAB ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC ,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC
,KC_MINS ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I ,KC_TAB ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
,KC_MPLY ,KC_SCLN ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN ,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN
,KC_HOME ,KC_END ,KC_DOWN ,KC_UP ,KC_COLN ,KC_HOME ,KC_END ,KC_DOWN ,KC_UP ,M(A_COLN)
,F(F_ALT),F(F_GUI) ,F(F_ALT),F(F_GUI)
,F(F_CTRL) ,F(F_CTRL)
,KC_BSPC,F(F_SFT),M(A_ESC) ,KC_BSPC,F(F_SFT),M(A_ESC)
// right hand // right hand
,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,M(KF_11) ,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_SLSH ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_EQL
,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_BSLS ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_BSLS
,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP ,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
,KC_MINS,KC_LEFT,KC_RGHT ,KC_PGUP ,KC_PGDN ,KC_MINS,KC_LEFT,KC_RGHT ,KC_PGUP ,KC_PGDN
@ -386,6 +407,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
), ),
/* Keymap 7: Steno for Plover
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | BASE | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | T | P | H | |------| |------| | F | P | L | T | D |
* |--------+ S +------+------+------+ * | | | | * +------+------+------+------+--------|
* | | | K | W | R | | | | | | R | B | G | S | Z |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | A | O |------| |------| E | U |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[PLVR] = KEYMAP(
// left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR),
KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, KC_NO,
KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
PV_A, PV_O, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
KC_NO, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO,PV_E, PV_U
),
/* Keymap 8: Experimental layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Next/Prev | ' | , | . | P | Y | [ | | ] | Q | F | C | R | J | = |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | \ |
* |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------|
* | Play/Pause| Z | K | V | G | X | | | | L | M | W | B | / | Stop |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | Home | End | Down | Up | : | | - | Left | Right| PgUp | PgDn |
* `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | LAlt | GUI | |EMACS | 1HND |
* ,------|------|------| |------+------+------.
* | | | Ctrl | | LEAD | | |
* |Backsp|LShift|------| |------| Enter| Space|
* | | | ESC | | HUN | | |
* `--------------------' `--------------------'
*/
[EXPRM] = KEYMAP(
// left hand
KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC
,KC_TAB ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
,KC_MPLY ,KC_Z ,KC_K ,KC_V ,KC_G ,KC_X ,KC_LPRN
,KC_HOME ,KC_END ,KC_DOWN ,KC_UP ,M(A_COLN)
,F(F_ALT),F(F_GUI)
,F(F_CTRL)
,KC_BSPC,F(F_SFT),M(A_ESC)
// right hand
,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
,KC_RBRC ,KC_Q ,KC_F ,KC_C ,KC_R ,KC_J ,KC_EQL
,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_BSLS
,KC_RPRN ,KC_L ,KC_M ,KC_W ,KC_B ,KC_SLSH ,KC_MSTP
,KC_MINS,KC_LEFT,KC_RGHT ,KC_PGUP ,KC_PGDN
,OSL(EMACS),M(OH_LEFT)
,KC_LEAD
,F(F_HUN),KC_ENT ,KC_SPC
),
}; };
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
@ -397,6 +508,29 @@ const uint16_t PROGMEM fn_actions[] = {
,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL)
}; };
void toggle_steno(int pressed)
{
uint8_t layer = biton32(layer_state);
if (pressed) {
if (layer != PLVR) layer_on(PLVR); else layer_off(PLVR);
register_code(PV_LP);
register_code(PV_LH);
register_code(PV_LR);
register_code(PV_O);
register_code(PV_RL);
register_code(PV_RG);
} else {
unregister_code(PV_LP);
unregister_code(PV_LH);
unregister_code(PV_LR);
unregister_code(PV_O);
unregister_code(PV_RL);
unregister_code(PV_RG);
}
}
macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char)
{ {
uint8_t need_shift = 0; uint8_t need_shift = 0;
@ -476,11 +610,53 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} else { } else {
register_code (KC_ESC); register_code (KC_ESC);
} }
layer_off (HUN);
} else { } else {
unregister_code (KC_ESC); unregister_code (KC_ESC);
} }
break; break;
case A_COLN:
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out());
if (record->event.pressed) {
if (oneshot)
clear_oneshot_mods ();
unregister_code (KC_LSFT);
register_code (KC_SCLN);
unregister_code (KC_SCLN);
if (!oneshot)
register_code (KC_LSFT);
}
} else {
return MACRODOWN (D(RSFT), T(SCLN), U(RSFT), END);
}
break;
case A_MPN:
if (record->event.pressed) {
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out());
if (oneshot)
clear_oneshot_mods ();
unregister_code (KC_LSFT);
register_code (KC_MPRV);
unregister_code (KC_MPRV);
if (!oneshot)
register_code (KC_LSFT);
} else {
return MACRO (T(MNXT), END);
}
}
break;
/* Hungarian layer */ /* Hungarian layer */
case HU_AA: case HU_AA:
return ang_do_hun (record, KC_QUOT, KC_A); return ang_do_hun (record, KC_QUOT, KC_A);
@ -666,6 +842,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
break; break;
/* Plover base */
case A_PLVR:
toggle_steno(record->event.pressed);
break;
/* GUI & AppSel */ /* GUI & AppSel */
case A_GUI: case A_GUI:
if (record->event.pressed) { if (record->event.pressed) {
@ -691,29 +872,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break; break;
case APP_SLK: case APP_SLK:
if (record->event.pressed) return MACRODOWN(T(S), T(C), T(U), T(D), T(C), T(L), T(O), T(U), T(D), T(ENT), END);
return MACRO(T(S), T(C), T(U), T(D), T(C), T(L), T(O), T(U), T(D), T(ENT), END);
break;
case APP_EMCS: case APP_EMCS:
if (record->event.pressed) return MACRODOWN(T(E), T(M), T(A), T(C), T(S), T(ENT), END);
return MACRO(T(E), T(M), T(A), T(C), T(S), T(ENT), END);
break;
case APP_TERM: case APP_TERM:
if (record->event.pressed) return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END);
return MACRO(T(T), T(E), T(R), T(M), T(ENT), END);
break;
case APP_CHRM: case APP_CHRM:
if (record->event.pressed) return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END);
return MACRO(T(C), T(H), T(R), T(O), T(M), T(ENT), END);
break;
case APP_MSIC: case APP_MSIC:
if (record->event.pressed) return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END);
return MACRO(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END);
break;
/* Function keys */ /* Function keys */
case KF_1 ... KF_11: case KF_1 ... KF_11:
@ -783,9 +954,16 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
// Runs just one time when the keyboard initializes. // Runs just one time when the keyboard initializes.
void matrix_init_user(void) { void matrix_init_user(void) {
ergodox_led_all_set (LED_BRIGHTNESS_LO);
ergodox_led_all_on(); ergodox_led_all_on();
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
ergodox_led_all_set (i);
_delay_ms (5);
}
_delay_ms(1000); _delay_ms(1000);
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
ergodox_led_all_set (i);
_delay_ms (10);
}
ergodox_led_all_off(); ergodox_led_all_off();
}; };
@ -798,12 +976,14 @@ void ang_do_unicode (void) {
unregister_code (KC_U); unregister_code (KC_U);
unregister_code (KC_RSFT); unregister_code (KC_RSFT);
unregister_code (KC_RCTL); unregister_code (KC_RCTL);
_delay_ms (100);
} }
void ang_tap (uint16_t codes[]) { void ang_tap (uint16_t codes[]) {
for (int i = 0; codes[i] != 0; i++) { for (int i = 0; codes[i] != 0; i++) {
register_code (codes[i]); register_code (codes[i]);
unregister_code (codes[i]); unregister_code (codes[i]);
_delay_ms (50);
} }
} }
@ -811,6 +991,8 @@ void ang_tap (uint16_t codes[]) {
register_code (code); \ register_code (code); \
unregister_code (code) unregister_code (code)
uint8_t is_exp = 0;
// Runs constantly in the background, in a loop. // Runs constantly in the background, in a loop.
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);
@ -829,6 +1011,16 @@ void matrix_scan_user(void) {
} else if (layer == EMACS) { } else if (layer == EMACS) {
ergodox_right_led_1_on(); ergodox_right_led_1_on();
ergodox_right_led_2_on(); ergodox_right_led_2_on();
} else if (layer == PLVR) {
ergodox_right_led_1_on ();
ergodox_right_led_2_on ();
ergodox_right_led_3_on ();
} else if (layer == EXPRM) {
ergodox_right_led_1_on ();
ergodox_right_led_2_on ();
ergodox_right_led_3_on ();
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
} }
if (layer == OHLFT || layer == OHRGT) { if (layer == OHLFT || layer == OHRGT) {
@ -863,7 +1055,7 @@ void matrix_scan_user(void) {
ergodox_right_led_1_on (); ergodox_right_led_1_on ();
} else { } else {
ergodox_right_led_1_set (LED_BRIGHTNESS_LO); ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
if (layer != OHLFT && layer != EMACS) if (layer != OHLFT && layer != EMACS && layer != PLVR && layer != EXPRM)
ergodox_right_led_1_off (); ergodox_right_led_1_off ();
} }
@ -873,7 +1065,7 @@ void matrix_scan_user(void) {
ergodox_right_led_2_on (); ergodox_right_led_2_on ();
} else { } else {
ergodox_right_led_2_set (LED_BRIGHTNESS_LO); ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != EMACS) if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != EMACS && layer != PLVR && layer != EXPRM)
ergodox_right_led_2_off (); ergodox_right_led_2_off ();
} }
@ -883,7 +1075,7 @@ void matrix_scan_user(void) {
ergodox_right_led_3_on (); ergodox_right_led_3_on ();
} else { } else {
ergodox_right_led_3_set (LED_BRIGHTNESS_LO); ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
if (layer != OHRGT && layer != HUN) if (layer != OHRGT && layer != HUN && layer != PLVR && layer != EXPRM)
ergodox_right_led_3_off (); ergodox_right_led_3_off ();
} }
@ -895,6 +1087,12 @@ void matrix_scan_user(void) {
ang_do_unicode (); ang_do_unicode ();
} }
#ifdef QMK_VERSION
SEQ_ONE_KEY (KC_V) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
#endif
SEQ_ONE_KEY (KC_L) { SEQ_ONE_KEY (KC_L) {
/* λ */ /* λ */
ang_do_unicode (); ang_do_unicode ();
@ -903,6 +1101,11 @@ void matrix_scan_user(void) {
ang_tap (codes); ang_tap (codes);
} }
SEQ_ONE_KEY (KC_Y) {
uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0};
ang_tap (codes);
}
SEQ_ONE_KEY (KC_S) { SEQ_ONE_KEY (KC_S) {
ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
TAP_ONCE (KC_BSLS); TAP_ONCE (KC_BSLS);
@ -928,5 +1131,42 @@ void matrix_scan_user(void) {
unregister_code (KC_UP); unregister_code (KC_UP);
unregister_code (KC_LGUI); unregister_code (KC_LGUI);
} }
SEQ_ONE_KEY (KC_E) {
if (is_exp == 0) {
default_layer_and (0);
default_layer_or ((1 << EXPRM));
is_exp = 1;
ergodox_led_all_off ();
ergodox_right_led_3_on ();
_delay_ms (100);
ergodox_right_led_2_on ();
_delay_ms (100);
ergodox_right_led_3_off ();
ergodox_right_led_1_on ();
_delay_ms (100);
ergodox_right_led_2_off ();
_delay_ms (100);
ergodox_right_led_1_off ();
} else {
is_exp = 0;
default_layer_and (0);
default_layer_or (1 << BASE);
ergodox_led_all_off ();
ergodox_right_led_1_on ();
_delay_ms (100);
ergodox_right_led_2_on ();
_delay_ms (100);
ergodox_right_led_1_off ();
ergodox_right_led_3_on ();
_delay_ms (100);
ergodox_right_led_2_off ();
_delay_ms (100);
ergodox_right_led_3_off ();
}
}
} }
} }

View file

@ -34,14 +34,19 @@ right). The more interesting parts are how certain keys behave:
* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of
the one-shot modifiers are in-flight (as in, single-tapped, and not expired the one-shot modifiers are in-flight (as in, single-tapped, and not expired
yet), it cancels all one-shot modifiers. Otherwise it sends the usual keycode. yet), it cancels all one-shot modifiers. Otherwise it sends the usual keycode.
* The **Emacs** and **Hun** layer keys are one-shot, the **1Hand** is a toggle. * The **Emacs** and **Hun** layer keys are one-shot, the **1Hand** and **STENO**
keys are toggles.
* The **Lead** key allows me to type in a sequence of keys, and trigger some * The **Lead** key allows me to type in a sequence of keys, and trigger some
actions: actions:
- `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that - `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that
does this. does this.
- `LEAD l` uses the unicode input method to enter a `λ`. - `LEAD l` uses the unicode input method to enter a `λ`.
- `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯` - `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯`
- `LEAD y` types `\o/`.
- `LEAD w m` maximises the currently focused window. - `LEAD w m` maximises the currently focused window.
- `LEAD e` makes the [experimental layer](#experimental-layer) the default.
- `LEAD v` prints the firmware version, the keyboard and the keymap, if
compiled with a QMK version that has these available.
## Hungarian layer ## Hungarian layer
@ -100,6 +105,26 @@ The differences are as follows:
* The `Apps`/`BASE` key can be used to go back to the base layer, by * The `Apps`/`BASE` key can be used to go back to the base layer, by
long-tapping it. A short-tap will send the `App` key, as usual. long-tapping it. A short-tap will send the `App` key, as usual.
## Steno layer
[![Steno layer for Plover](images/steno-layer.png)](http://www.keyboard-layout-editor.com/#/gists/401ef9a84369e47c57f9aedcf0a0d667)
This is to be used with [Plover](http://www.openstenoproject.org/plover/),
nothing really fancy here. The **STENO** key toggles the layer on and off, and
sends the toggle command to Plover too.
## Experimental layer
[![Experimental layer](images/experimental-layer.png)](http://www.keyboard-layout-editor.com/#/gists/6ff50bf71248e05aab5b3fec4fae3d08)
While using the standard Dvorak layout, I encountered a number of
inconveniences, and on this layer, I am playing with ideas to make the layout
feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too,
had shortcomings I was not happy with. So now this is something inbetween, with
own observations thrown in. How it works out in the long run remains to be seen.
[cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm
# Building # Building
To make my workflow easier, this layout is maintained in To make my workflow easier, this layout is maintained in

View file

@ -0,0 +1,5 @@
#! /bin/sh
WIN="$(xdotool getactivewindow)"
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
xdotool windowsize ${WIN} 100% 100%
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz