aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox/keymaps/algernon/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ergodox/keymaps/algernon/keymap.c')
-rw-r--r--keyboards/ergodox/keymaps/algernon/keymap.c381
1 files changed, 179 insertions, 202 deletions
diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c
index 9f476d8a6..248a0ed30 100644
--- a/keyboards/ergodox/keymaps/algernon/keymap.c
+++ b/keyboards/ergodox/keymaps/algernon/keymap.c
@@ -8,7 +8,6 @@
#include "debug.h"
#include "action_layer.h"
#include "action_util.h"
-#include "mousekey.h"
#include "timer.h"
#include "keymap_plover.h"
#include "eeconfig.h"
@@ -36,18 +35,6 @@ enum {
A_PLVR,
A_MPN,
- // Function / number keys
- KF_1, // 1, F1
- KF_2, // 2, F2
- KF_3, // ...
- KF_4,
- KF_5,
- KF_6,
- KF_7,
- KF_8,
- KF_9,
- KF_10,
-
// Application select keys
APP_SLK, // Slack
APP_EMCS, // Emacs
@@ -55,17 +42,6 @@ enum {
APP_CHRM, // Chrome
APP_MSIC, // Music
- // Diagonal mouse movement
- A_MUL,
- A_MUR,
- A_MDL,
- A_MDR,
-
- // Mouse acceleration
- A_ACL0,
- A_ACL1,
- A_ACL2,
-
// Hungarian layer keys
HU_AA, // Á
HU_OO, // Ó
@@ -76,6 +52,18 @@ enum {
HU_UE, // Ü
HU_OEE, // Ő
HU_UEE, // Ű
+
+ // number/symbol keys
+ A_1, // 1
+ A_2, // 2
+ A_3, // ...
+ A_4,
+ A_5,
+ A_6,
+ A_7,
+ A_8,
+ A_9,
+ A_0,
};
/* Fn keys */
@@ -95,7 +83,9 @@ enum {
CT_CLN = 0,
CT_TA,
CT_LBP,
- CT_RBP
+ CT_RBP,
+ CT_TMUX,
+ CT_TPS,
};
/* States & timers */
@@ -114,6 +104,8 @@ bool log_enable = false;
bool time_travel = false;
+static uint8_t is_adore = 0;
+
/* The Keymap */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -121,13 +113,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
- * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
+ * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ |
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
* | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow |
- * |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------|
- * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop |
+ * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
+ * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | : | | - | | | | |
* `-----------------------------------' `-----------------------------------'
@@ -141,22 +133,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[BASE] = KEYMAP(
// left hand
- M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
-,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP)
-,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
-,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN)
-,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
+ M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
+,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP)
+,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
+,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX)
+,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
,F(F_ALT),F(F_GUI)
,F(F_CTRL)
,KC_BSPC,F(F_SFT),KC_ESC
// right hand
- ,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
- ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
- ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
- ,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
- ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+ ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
+ ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
+ ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
+ ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
+ ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,OSL(NMDIA),KC_DEL
,KC_LEAD
@@ -166,15 +158,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 1: Adore layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
- * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
+ * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
- * | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ |
+ * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ |
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
* | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = |
- * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
- * | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | |
+ * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
+ * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
- * | | | | | | | | | | | |
+ * | | | | | : | | - | | | | |
* `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | LAlt | GUI | | MDIA | Del |
@@ -186,22 +178,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[ADORE] = KEYMAP(
// left hand
- KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
-,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP)
-,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U
-,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN)
-,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+ KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
+,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP)
+,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U
+,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX)
+,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
,F(F_ALT),F(F_GUI)
,F(F_CTRL)
,KC_BSPC,F(F_SFT),KC_ESC
// right hand
- ,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
- ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS
- ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
- ,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO
- ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+ ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
+ ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS
+ ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
+ ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO
+ ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,OSL(NMDIA),KC_DEL
,F(F_HUN)
@@ -350,45 +342,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 5: Navigation & Media layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
- * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | |
+ * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
- * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen|
- * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------|
- * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | |
- * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------|
- * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop |
+ * | | | | | | | | | | | | | | | |
+ * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
+ * | | | | | | |------| |------| | | | | | |
+ * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
+ * | | | | | | | | | | | | | | | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
- * | Mute | VlUp | | BASE | MClk |
+ * | Mute | VlUp | | BASE | |
* ,------|------|------| |------+------+------.
- * | | | VlDn | | Prev |Left |Right |
- * | SPC | Enter|------| |------| Click| Click|
- * | | | ESC | | Next | | |
+ * | | | VlDn | | | | |
+ * | | |------| |------| | |
+ * | | | | | | | |
* `--------------------' `--------------------'
*/
[NMDIA] = KEYMAP(
// left hand
- M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L)
-,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO
-,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO
-,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO
+ KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO
+,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_MUTE ,KC_VOLU
,KC_VOLD
- ,KC_SPC,KC_ENTER,KC_ESC
+ ,KC_NO ,KC_NO ,KC_TRNS
// right hand
- ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
- ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR
- ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO
- ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP
+ ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
+ ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+ ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
+ ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
- ,KC_TRNS ,KC_MS_BTN3
- ,KC_MPRV
- ,KC_MNXT ,KC_BTN1 ,KC_BTN2
+ ,KC_TRNS ,KC_NO
+ ,KC_NO
+ ,KC_NO ,KC_NO ,KC_NO
),
/* Keymap 6: Steno for Plover
@@ -514,40 +506,62 @@ static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_c
return MACRO_NONE;
}
-static bool from_appsel;
+static void ang_handle_num_row(uint8_t id, keyrecord_t *record) {
+ uint8_t idx = id - A_1;
+ uint8_t kc;
+ static bool shifted[10];
-static void ang_handle_kf (keyrecord_t *record, uint8_t id)
-{
- uint8_t code = id - KF_1;
+ if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
+ ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
+ if (record->event.pressed)
+ shifted[idx] = true;
+ }
- if (record->event.pressed) {
- kf_timers[code] = timer_read ();
+ if (!shifted[idx]) {
+ kc = idx + KC_1;
} else {
- uint8_t kc_base;
-
- if (from_appsel) {
- from_appsel = false;
+ switch (id) {
+ case A_8:
+ case A_9:
+ shifted[idx] = false;
return;
- }
- if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) {
- // Long press
- kc_base = KC_F1;
- } else {
- kc_base = KC_1;
+ case A_7:
+ kc = KC_2;
+ break;
+ case A_5:
+ kc = KC_8;
+ break;
+ case A_3:
+ kc = KC_6;
+ break;
+ case A_1:
+ kc = KC_4;
+ break;
+
+ case A_0:
+ kc = KC_5;
+ break;
+ case A_2:
+ kc = KC_1;
+ break;
+ case A_4:
+ kc = KC_3;
+ break;
+ case A_6:
+ kc = KC_7;
+ break;
}
- kf_timers[code] = 0;
- code += kc_base;
+ }
- register_code (code);
- unregister_code (code);
+ if (record->event.pressed) {
+ register_code (kc);
+ } else {
+ unregister_code (kc);
+ shifted[idx] = false;
}
}
-static struct {
- uint8_t idx;
-} m_accel_state;
-
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
@@ -592,70 +606,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case HU_UEE:
return ang_do_hun (record, KC_EQL, KC_U);
-#if MOUSEKEY_ENABLE
- /* Mouse movement */
- case A_MUL:
- if (record->event.pressed) {
- mousekey_on(KC_MS_UP);
- mousekey_on(KC_MS_LEFT);
- } else {
- mousekey_off(KC_MS_UP);
- mousekey_off(KC_MS_LEFT);
- }
- mousekey_send();
- break;
-
- case A_MUR:
- if (record->event.pressed) {
- mousekey_on(KC_MS_UP);
- mousekey_on(KC_MS_RIGHT);
- } else {
- mousekey_off(KC_MS_UP);
- mousekey_off(KC_MS_RIGHT);
- }
- mousekey_send();
- break;
-
- case A_MDL:
- if (record->event.pressed) {
- mousekey_on(KC_MS_DOWN);
- mousekey_on(KC_MS_LEFT);
- } else {
- mousekey_off(KC_MS_DOWN);
- mousekey_off(KC_MS_LEFT);
- }
- mousekey_send();
- break;
-
- case A_MDR:
- if (record->event.pressed) {
- mousekey_on(KC_MS_DOWN);
- mousekey_on(KC_MS_RIGHT);
- } else {
- mousekey_off(KC_MS_DOWN);
- mousekey_off(KC_MS_RIGHT);
- }
- mousekey_send();
- break;
-
- case A_ACL0 ... A_ACL2:
- if (record->event.pressed) {
- uint8_t idx = id - A_ACL0;
- if (m_accel_state.idx == id) {
- mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0);
- m_accel_state.idx = 0;
- } else {
- if (m_accel_state.idx) {
- mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0);
- m_accel_state.idx = 0;
- }
- mousekey_on(KC_ACL0 + idx);
- m_accel_state.idx = id;
- }
- }
- break;
-#endif
-
/* Plover base */
case A_PLVR:
toggle_steno(record->event.pressed);
@@ -667,7 +617,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
register_code (KC_LGUI);
if (record->tap.count && !record->tap.interrupted) {
if (record->tap.count >= 2) {
- register_code (KC_W);
layer_on (APPSEL);
set_oneshot_layer (APPSEL, ONESHOT_START);
}
@@ -678,7 +627,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} else {
if (record->tap.count >= 2)
{
- unregister_code (KC_W);
clear_oneshot_layer_state (ONESHOT_PRESSED);
}
gui_timer = timer_read ();
@@ -686,43 +634,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break;
case APP_SLK:
- from_appsel = true;
- return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END);
+ if (record->event.pressed)
+ uprintf("CMD:appsel_slack\n");
+ break;
case APP_EMCS:
- from_appsel = true;
- return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END);
+ if (record->event.pressed)
+ uprintf("CMD:appsel_emacs\n");
+ break;
case APP_TERM:
- from_appsel = true;
- if (!record->event.pressed) {
- register_code(KC_ESC);
- unregister_code(KC_ESC);
- wait_ms(TAPPING_TERM + 25);
- register_code(KC_DEL);
- unregister_code(KC_DEL);
- }
+ if (record->event.pressed)
+ uprintf("CMD:appsel_term\n");
break;
case APP_CHRM:
- from_appsel = true;
- return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END);
+ if (record->event.pressed)
+ uprintf("CMD:appsel_chrome\n");
+ break;
case APP_MSIC:
- from_appsel = true;
- return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END);
+ if (record->event.pressed)
+ uprintf("CMD:appsel_music\n");
+ break;
- /* Function keys */
- case KF_1 ... KF_10:
- ang_handle_kf (record, id);
+ // number row and symbols
+ case A_1 ... A_0:
+ ang_handle_num_row(id, record);
break;
}
return MACRO_NONE;
};
-static uint8_t is_adore = 0;
-
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
uint8_t dl;
@@ -805,6 +749,36 @@ static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data
layer_off (ARRW);
}
+static void ang_tap_dance_tmux_finished (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ register_code(KC_LALT);
+ register_code(KC_SPC);
+ unregister_code(KC_SPC);
+ unregister_code(KC_LALT);
+ } else {
+ register_code(KC_LCTL);
+ register_code(KC_A);
+ unregister_code(KC_A);
+ unregister_code(KC_LCTL);
+ }
+}
+
+static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *user_data) {
+ uint8_t kc = KC_P;
+
+ if (state->count >= 2) {
+ kc = KC_Z;
+ }
+
+ register_code(KC_LALT);
+ register_code(KC_SPC);
+ unregister_code(KC_SPC);
+ unregister_code(KC_LALT);
+
+ register_code(kc);
+ unregister_code(kc);
+}
+
qk_tap_dance_action_t tap_dance_actions[] = {
[CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
,[CT_TA] = {
@@ -813,12 +787,23 @@ qk_tap_dance_action_t tap_dance_actions[] = {
}
,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN)
,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
+ ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
+ ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
+ static uint32_t prev_layer_state;
uint8_t layer = biton32(layer_state);
bool is_arrow = false;
+ static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
+
+ if (layer_state != prev_layer_state) {
+ prev_layer_state = layer_state;
+ if (layer_lookup[layer])
+ uprintf("LAYER: %s\n", layer_lookup[layer]);
+ }
+
if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
unregister_code (KC_LGUI);
@@ -929,18 +914,7 @@ void matrix_scan_user(void) {
}
SEQ_TWO_KEYS (KC_W, KC_M) {
- register_code (KC_LALT);
- register_code (KC_F2);
- unregister_code (KC_F2);
- unregister_code (KC_LALT);
-
- wait_ms (1000);
-
- ang_tap (KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0);
- register_code (KC_LGUI);
- register_code (KC_UP);
- unregister_code (KC_UP);
- unregister_code (KC_LGUI);
+ uprintf("CMD:wm\n");
}
SEQ_ONE_KEY (KC_A) {
@@ -999,8 +973,11 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
#if KEYLOGGER_ENABLE
if (log_enable) {
- xprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col,
- record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak");
+ uint8_t layer = biton32(layer_state);
+
+ if ((layer == ADORE) || (layer == BASE))
+ uprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col,
+ record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak");
}
#endif
@@ -1047,8 +1024,8 @@ void qk_ucis_symbol_fallback (void) {
for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
uint8_t code;
- if (qk_ucis_state.codes[i] > KF_1)
- code = qk_ucis_state.codes[i] - KF_1 + KC_1;
+ if ((qk_ucis_state.codes[i] >= M(A_1)) && (qk_ucis_state.codes[i] <= M(A_0)))
+ code = qk_ucis_state.codes[i] - M(A_1) + KC_1;
else
code = qk_ucis_state.codes[i];
register_code(code);