|
|
@ -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
|
|
|
|
#define A_MUL 1 // mouse up-left
|
|
|
|
A_GUI,
|
|
|
|
#define A_MUR 2 // mouse up-right
|
|
|
|
A_PLVR,
|
|
|
|
#define A_MDL 3 // mouse down-left
|
|
|
|
A_ESC,
|
|
|
|
#define A_MDR 4 // mouse down-right
|
|
|
|
A_MPN,
|
|
|
|
|
|
|
|
A_COLN,
|
|
|
|
#define AE_VIS 5 // Visual mode
|
|
|
|
|
|
|
|
#define AE_PSTDEL 6 // Paste/Delete
|
|
|
|
// Function / number keys
|
|
|
|
#define AE_CPYC 7 // Copy/Cut
|
|
|
|
KF_1, // 1, F1
|
|
|
|
#define AE_EMACS 8 // Emacs copy & paste mode
|
|
|
|
KF_2, // 2, F2
|
|
|
|
#define AE_TERM 9 // Terminal copy & paste mode
|
|
|
|
KF_3, // ...
|
|
|
|
#define AE_OTHER 10 // Other copy & paste mode
|
|
|
|
KF_4,
|
|
|
|
#define AE_INS 11 // Insert mode
|
|
|
|
KF_5,
|
|
|
|
#define AE_OVR 12 // Overwrite mode
|
|
|
|
KF_6,
|
|
|
|
#define AE_APPND 13 // Append
|
|
|
|
KF_7,
|
|
|
|
|
|
|
|
KF_8,
|
|
|
|
#define HU_AA 14 // Á
|
|
|
|
KF_9,
|
|
|
|
#define HU_OO 15 // Ó
|
|
|
|
KF_10,
|
|
|
|
#define HU_EE 16 // É
|
|
|
|
KF_11, // =, F11
|
|
|
|
#define HU_UU 17 // Ú
|
|
|
|
|
|
|
|
#define HU_II 18 // Í
|
|
|
|
// Application select keys
|
|
|
|
#define HU_OE 19 // Ö
|
|
|
|
APP_SLK, // Slack
|
|
|
|
#define HU_UE 20 // Ü
|
|
|
|
APP_EMCS, // Emacs
|
|
|
|
#define HU_OEE 21 // Ő
|
|
|
|
APP_TERM, // Terminal
|
|
|
|
#define HU_UEE 22 // Ű
|
|
|
|
APP_CHRM, // Chrome
|
|
|
|
|
|
|
|
APP_MSIC, // Music
|
|
|
|
#define APP_SLK 23 // Slack
|
|
|
|
|
|
|
|
#define APP_EMCS 24 // Emacs
|
|
|
|
// Diagonal mouse movement
|
|
|
|
#define APP_TERM 25 // Terminal
|
|
|
|
A_MUL,
|
|
|
|
#define APP_CHRM 26 // Chrome
|
|
|
|
A_MUR,
|
|
|
|
#define APP_MSIC 27 // Music
|
|
|
|
A_MDL,
|
|
|
|
|
|
|
|
A_MDR,
|
|
|
|
#define KF_1 28 // 1, F1
|
|
|
|
|
|
|
|
#define KF_2 29 // 2, F2
|
|
|
|
// Emacs layer keys
|
|
|
|
#define KF_3 30 // ...
|
|
|
|
AE_VIS, // Visual mode
|
|
|
|
#define KF_4 31
|
|
|
|
AE_PSTDEL, // Paste/Delete
|
|
|
|
#define KF_5 32
|
|
|
|
AE_CPYC, // Copy/Cut
|
|
|
|
#define KF_6 33
|
|
|
|
AE_EMACS, // Emacs copy & paste mode
|
|
|
|
#define KF_7 34
|
|
|
|
AE_TERM, // Terminal copy & paste mode
|
|
|
|
#define KF_8 35
|
|
|
|
AE_OTHER, // Other copy & paste mode
|
|
|
|
#define KF_9 36
|
|
|
|
AE_INS, // Insert mode
|
|
|
|
#define KF_10 37
|
|
|
|
AE_OVR, // Overwrite mode
|
|
|
|
#define KF_11 38 // =, F11
|
|
|
|
AE_APPND, // Append
|
|
|
|
|
|
|
|
|
|
|
|
#define OH_BSSPC 39
|
|
|
|
// Hungarian layer keys
|
|
|
|
#define OH_ENTSFT 40
|
|
|
|
HU_AA, // Á
|
|
|
|
#define OH_BASE 41
|
|
|
|
HU_OO, // Ó
|
|
|
|
#define OH_LEFT 42
|
|
|
|
HU_EE, // É
|
|
|
|
#define OH_RIGHT 43
|
|
|
|
HU_UU, // Ú
|
|
|
|
|
|
|
|
HU_II, // Í
|
|
|
|
|
|
|
|
HU_OE, // Ö
|
|
|
|
|
|
|
|
HU_UE, // Ü
|
|
|
|
|
|
|
|
HU_OEE, // Ő
|
|
|
|
|
|
|
|
HU_UEE, // Ű
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// One-handed layout specials
|
|
|
|
|
|
|
|
OH_BSSPC,
|
|
|
|
|
|
|
|
OH_ENTSFT,
|
|
|
|
|
|
|
|
OH_BASE,
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|