Add double tap guard for Additional Features

- Add Issues
- Fix suspend
- Add MIRYOKU_KLUDGE_DOUBLETAPBOOT
This commit is contained in:
Manna Harbour 2022-10-13 17:18:28 +11:00
parent 92dca97c92
commit f6b87ad38c
7 changed files with 112 additions and 53 deletions

View File

@ -38,6 +38,8 @@ MIRYOKU_LAYER_LIST
#include "miryoku_shift_functions.dtsi"
#include "miryoku_double_tap_guard.dtsi"
#if defined (MIRYOKU_KLUDGE_MOUSEKEYSPR)
#include "miryoku_kludge_mousekeyspr.dtsi"
#else

View File

@ -17,6 +17,8 @@
#include "miryoku_clipboard.h"
#include "miryoku_double_tap_guard.h"
#if defined (MIRYOKU_KLUDGE_MOUSEKEYSPR)
#include "miryoku_kludge_mousekeyspr.h"
#else

View File

@ -249,134 +249,134 @@ U_NP, U_NP, &kp ESC, &kp SPC, &kp
#define MIRYOKU_ALTERNATIVES_NAV_INVERTEDT_FLIP \
&kp PG_UP, &kp HOME, &kp UP, &kp END, &kp INS, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&kp PG_UP, &kp HOME, &kp UP, &kp END, &kp INS, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&kp PG_DN, &kp LEFT, &kp DOWN, &kp RIGHT, &u_caps_word, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &to U_NAV, &to U_NUM, &kp RALT, U_NA, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &u_to_U_NAV, &u_to_U_NUM, &kp RALT, U_NA, \
U_NP, U_NP, &kp DEL, &kp BSPC, &kp RET, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_NAV_FLIP \
&kp HOME, &kp PG_DN, &kp PG_UP, &kp END, &kp INS, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&kp HOME, &kp PG_DN, &kp PG_UP, &kp END, &kp INS, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&kp LEFT, &kp DOWN, &kp UP, &kp RIGHT, &u_caps_word, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &to U_NAV, &to U_NUM, &kp RALT, U_NA, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &u_to_U_NAV, &u_to_U_NUM, &kp RALT, U_NA, \
U_NP, U_NP, &kp DEL, &kp BSPC, &kp RET, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_NAV_INVERTEDT \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &kp INS, &kp HOME, &kp UP, &kp END, &kp PG_UP, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &kp INS, &kp HOME, &kp UP, &kp END, &kp PG_UP, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &u_caps_word, &kp LEFT, &kp DOWN, &kp RIGHT, &kp PG_DN, \
U_NA, &kp RALT, &to U_NUM, &to U_NAV, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_NA, &kp RALT, &u_to_U_NUM, &u_to_U_NAV, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp RET, &kp BSPC, &kp DEL, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_NAV_VI \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &kp LEFT, &kp DOWN, &kp UP, &kp RIGHT, &u_caps_word, \
U_NA, &kp RALT, &to U_NUM, &to U_NAV, U_NA, &kp HOME, &kp PG_DN, &kp PG_UP, &kp END, &kp INS, \
U_NA, &kp RALT, &u_to_U_NUM, &u_to_U_NAV, U_NA, &kp HOME, &kp PG_DN, &kp PG_UP, &kp END, &kp INS, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp RET, &kp BSPC, &kp DEL, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_NAV \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &u_caps_word, &kp LEFT, &kp DOWN, &kp UP, &kp RIGHT, \
U_NA, &kp RALT, &to U_NUM, &to U_NAV, U_NA, &kp INS, &kp HOME, &kp PG_DN, &kp PG_UP, &kp END, \
U_NA, &kp RALT, &u_to_U_NUM, &u_to_U_NAV, U_NA, &kp INS, &kp HOME, &kp PG_DN, &kp PG_UP, &kp END, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp RET, &kp BSPC, &kp DEL, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MOUSE_INVERTEDT_FLIP \
U_WH_U, U_WH_L, U_MS_U, U_WH_R, U_NU, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
U_WH_U, U_WH_L, U_MS_U, U_WH_R, U_NU, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
U_WH_D, U_MS_L, U_MS_D, U_MS_R, U_NU, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &to U_MOUSE, &to U_SYM, &kp RALT, U_NA, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &u_to_U_MOUSE, &u_to_U_SYM, &kp RALT, U_NA, \
U_NP, U_NP, U_BTN3, U_BTN1, U_BTN2, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MOUSE_FLIP \
U_WH_L, U_WH_D, U_WH_U, U_WH_R, U_NU, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
U_WH_L, U_WH_D, U_WH_U, U_WH_R, U_NU, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
U_MS_L, U_MS_D, U_MS_U, U_MS_R, U_NU, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &to U_MOUSE, &to U_SYM, &kp RALT, U_NA, \
U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, &u_to_U_MOUSE, &u_to_U_SYM, &kp RALT, U_NA, \
U_NP, U_NP, U_BTN3, U_BTN1, U_BTN2, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MOUSE_INVERTEDT \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, U_NU, U_WH_L, U_MS_U, U_WH_R, U_WH_U, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, U_NU, U_WH_L, U_MS_U, U_WH_R, U_WH_U, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, U_NU, U_MS_L, U_MS_D, U_MS_R, U_WH_D, \
U_NA, &kp RALT, &to U_SYM, &to U_MOUSE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_NA, &kp RALT, &u_to_U_SYM, &u_to_U_MOUSE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_NP, U_NP, U_NA, U_NA, U_NA, U_BTN2, U_BTN1, U_BTN3, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MOUSE_VI \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, U_MS_L, U_MS_D, U_MS_U, U_MS_R, U_NU, \
U_NA, &kp RALT, &to U_SYM, &to U_MOUSE, U_NA, U_WH_L, U_WH_D, U_WH_U, U_WH_R, U_NU, \
U_NA, &kp RALT, &u_to_U_SYM, &u_to_U_MOUSE, U_NA, U_WH_L, U_WH_D, U_WH_U, U_WH_R, U_NU, \
U_NP, U_NP, U_NA, U_NA, U_NA, U_BTN2, U_BTN1, U_BTN3, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MOUSE \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, U_NU, U_MS_L, U_MS_D, U_MS_U, U_MS_R, \
U_NA, &kp RALT, &to U_SYM, &to U_MOUSE, U_NA, U_NU, U_WH_L, U_WH_D, U_WH_U, U_WH_R, \
U_NA, &kp RALT, &u_to_U_SYM, &u_to_U_MOUSE, U_NA, U_NU, U_WH_L, U_WH_D, U_WH_U, U_WH_R, \
U_NP, U_NP, U_NA, U_NA, U_NA, U_BTN2, U_BTN1, U_BTN3, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MEDIA_INVERTEDT_FLIP \
&u_rgb_hui, &u_rgb_sai, &kp C_VOL_UP, &u_rgb_bri, &u_rgb_tog, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&u_rgb_hui, &u_rgb_sai, &kp C_VOL_UP, &u_rgb_bri, &u_rgb_tog, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&u_rgb_eff, &kp C_PREV, &kp C_VOL_DN, &kp C_NEXT, &u_ep_tog, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
&u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, &u_out_tog, U_NA, &to U_MEDIA, &to U_FUN, &kp RALT, U_NA, \
&u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, &u_out_tog, U_NA, &u_to_U_MEDIA, &u_to_U_FUN, &kp RALT, U_NA, \
U_NP, U_NP, &kp C_MUTE, &kp C_PP, &kp C_STOP, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MEDIA_FLIP \
&u_rgb_eff, &u_rgb_hui, &u_rgb_sai, &u_rgb_bri, &u_rgb_tog, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&u_rgb_eff, &u_rgb_hui, &u_rgb_sai, &u_rgb_bri, &u_rgb_tog, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&kp C_PREV, &kp C_VOL_DN, &kp C_VOL_UP, &kp C_NEXT, &u_ep_tog, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
&u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, &u_out_tog, U_NA, &to U_MEDIA, &to U_FUN, &kp RALT, U_NA, \
&u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, &u_out_tog, U_NA, &u_to_U_MEDIA, &u_to_U_FUN, &kp RALT, U_NA, \
U_NP, U_NP, &kp C_MUTE, &kp C_PP, &kp C_STOP, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MEDIA_INVERTEDT \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &u_rgb_tog, &u_rgb_eff, &kp C_VOL_UP, &u_rgb_hui, &u_rgb_sai, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &u_rgb_tog, &u_rgb_eff, &kp C_VOL_UP, &u_rgb_hui, &u_rgb_sai, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &u_ep_tog, &kp C_PREV, &kp C_VOL_DN, &kp C_NEXT, &u_rgb_bri, \
U_NA, &kp RALT, &to U_FUN, &to U_MEDIA, U_NA, &u_out_tog, &u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, \
U_NA, &kp RALT, &u_to_U_FUN, &u_to_U_MEDIA, U_NA, &u_out_tog, &u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp C_STOP, &kp C_PP, &kp C_MUTE, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MEDIA_VI \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &u_rgb_eff, &u_rgb_hui, &u_rgb_sai, &u_rgb_bri, &u_rgb_tog, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &u_rgb_eff, &u_rgb_hui, &u_rgb_sai, &u_rgb_bri, &u_rgb_tog, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &kp C_PREV, &kp C_VOL_DN, &kp C_VOL_UP, &kp C_NEXT, &u_ep_tog, \
U_NA, &kp RALT, &to U_FUN, &to U_MEDIA, U_NA, &u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, &u_out_tog, \
U_NA, &kp RALT, &u_to_U_FUN, &u_to_U_MEDIA, U_NA, &u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, &u_out_tog, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp C_STOP, &kp C_PP, &kp C_MUTE, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_MEDIA \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &u_rgb_tog, &u_rgb_eff, &u_rgb_hui, &u_rgb_sai, &u_rgb_bri, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &u_rgb_tog, &u_rgb_eff, &u_rgb_hui, &u_rgb_sai, &u_rgb_bri, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &u_ep_tog, &kp C_PREV, &kp C_VOL_DN, &kp C_VOL_UP, &kp C_NEXT, \
U_NA, &kp RALT, &to U_FUN, &to U_MEDIA, U_NA, &u_out_tog, &u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, \
U_NA, &kp RALT, &u_to_U_FUN, &u_to_U_MEDIA, U_NA, &u_out_tog, &u_bt_sel_0, &u_bt_sel_1, &u_bt_sel_2, &u_bt_sel_3, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp C_STOP, &kp C_PP, &kp C_MUTE, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_NUM_FLIP \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &kp LBKT, &kp NUM_7, &kp NUM_8, &kp NUM_9, &kp RBKT, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &kp LBKT, &kp NUM_7, &kp NUM_8, &kp NUM_9, &kp RBKT, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &kp EQL, &kp NUM_4, &kp NUM_5, &kp NUM_6, &kp SEMI, \
U_NA, &kp RALT, &to U_NAV, &to U_NUM, U_NA, &kp BSLH, &kp NUM_1, &kp NUM_2, &kp NUM_3, &kp GRAVE, \
U_NA, &kp RALT, &u_to_U_NAV, &u_to_U_NUM, U_NA, &kp BSLH, &kp NUM_1, &kp NUM_2, &kp NUM_3, &kp GRAVE, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp MINUS, &kp NUM_0, &kp DOT, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_NUM \
&kp LBKT, &kp NUM_7, &kp NUM_8, &kp NUM_9, &kp RBKT, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&kp LBKT, &kp NUM_7, &kp NUM_8, &kp NUM_9, &kp RBKT, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&kp SEMI, &kp NUM_4, &kp NUM_5, &kp NUM_6, &kp EQL, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
&kp GRAVE, &kp NUM_1, &kp NUM_2, &kp NUM_3, &kp BSLH, U_NA, &to U_NUM, &to U_NAV, &kp RALT, U_NA, \
&kp GRAVE, &kp NUM_1, &kp NUM_2, &kp NUM_3, &kp BSLH, U_NA, &u_to_U_NUM, &u_to_U_NAV, &kp RALT, U_NA, \
U_NP, U_NP, &kp DOT, &kp NUM_0, &kp MINUS, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_SYM_FLIP \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &kp LBRC, &kp AMPS, &kp ASTRK, &kp LPAR, &kp RBRC, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &kp LBRC, &kp AMPS, &kp ASTRK, &kp LPAR, &kp RBRC, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &kp PLUS, &kp DLLR, &kp PRCT, &kp CRRT, &kp COLON, \
U_NA, &kp RALT, &to U_MOUSE, &to U_SYM, U_NA, &kp PIPE, &kp EXCL, &kp AT, &kp HASH, &kp TILDE, \
U_NA, &kp RALT, &u_to_U_MOUSE, &u_to_U_SYM, U_NA, &kp PIPE, &kp EXCL, &kp AT, &kp HASH, &kp TILDE, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp UNDER, &kp LPAR, &kp RPAR, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_SYM \
&kp LBRC, &kp AMPS, &kp ASTRK, &kp LPAR, &kp RBRC, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&kp LBRC, &kp AMPS, &kp ASTRK, &kp LPAR, &kp RBRC, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&kp COLON, &kp DLLR, &kp PRCT, &kp CRRT, &kp PLUS, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
&kp TILDE, &kp EXCL, &kp AT, &kp HASH, &kp PIPE, U_NA, &to U_SYM, &to U_MOUSE, &kp RALT, U_NA, \
&kp TILDE, &kp EXCL, &kp AT, &kp HASH, &kp PIPE, U_NA, &u_to_U_SYM, &u_to_U_MOUSE, &kp RALT, U_NA, \
U_NP, U_NP, &kp LPAR, &kp RPAR, &kp UNDER, U_NA, U_NA, U_NA, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_FUN_FLIP \
&u_bootloader, &to U_TAP, &to U_EXTRA, &to U_BASE, U_NA, &kp PSCRN, &kp F7, &kp F8, &kp F9, &kp F12, \
U_BOOT, &u_to_U_TAP, &u_to_U_EXTRA, &u_to_U_BASE, U_NA, &kp PSCRN, &kp F7, &kp F8, &kp F9, &kp F12, \
&kp LGUI, &kp LALT, &kp LCTRL, &kp LSHFT, U_NA, &kp SLCK, &kp F4, &kp F5, &kp F6, &kp F11, \
U_NA, &kp RALT, &to U_MEDIA, &to U_FUN, U_NA, &kp PAUSE_BREAK, &kp F1, &kp F2, &kp F3, &kp F10, \
U_NA, &kp RALT, &u_to_U_MEDIA, &u_to_U_FUN, U_NA, &kp PAUSE_BREAK, &kp F1, &kp F2, &kp F3, &kp F10, \
U_NP, U_NP, U_NA, U_NA, U_NA, &kp TAB, &kp SPC, &kp K_APP, U_NP, U_NP
#define MIRYOKU_ALTERNATIVES_FUN \
&kp F12, &kp F7, &kp F8, &kp F9, &kp PSCRN, U_NA, &to U_BASE, &to U_EXTRA, &to U_TAP, &u_bootloader, \
&kp F12, &kp F7, &kp F8, &kp F9, &kp PSCRN, U_NA, &u_to_U_BASE, &u_to_U_EXTRA, &u_to_U_TAP, U_BOOT, \
&kp F11, &kp F4, &kp F5, &kp F6, &kp SLCK, U_NA, &kp LSHFT, &kp LCTRL, &kp LALT, &kp LGUI, \
&kp F10, &kp F1, &kp F2, &kp F3, &kp PAUSE_BREAK, U_NA, &to U_FUN, &to U_MEDIA, &kp RALT, U_NA, \
&kp F10, &kp F1, &kp F2, &kp F3, &kp PAUSE_BREAK, U_NA, &u_to_U_FUN, &u_to_U_MEDIA, &kp RALT, U_NA, \
U_NP, U_NP, &kp K_APP, &kp SPC, &kp TAB, U_NA, U_NA, U_NA, U_NP, U_NP

View File

@ -0,0 +1,28 @@
// Copyright 2022 Manna Harbour
// https://github.com/manna-harbour/miryoku
#define MIRYOKU_DOUBLE_TAP_GUARD(NAME, BINDING) \
/ { \
behaviors { \
NAME: NAME { \
compatible = "zmk,behavior-tap-dance"; \
label = U_STRINGIFY(NAME); \
#binding-cells = <0>; \
tapping-term-ms = <U_TAPPING_TERM>; \
bindings = <&none>, <BINDING>; \
}; \
}; \
};
#define MIRYOKU_X(LAYER, STRING) \
MIRYOKU_DOUBLE_TAP_GUARD(u_to_U_##LAYER, &to U_##LAYER)
MIRYOKU_LAYER_LIST
#undef MIRYOKU_X
#if defined (MIRYOKU_KLUDGE_DOUBLETAPBOOT)
#if defined (MIRYOKU_KLUDGE_SUSPEND)
MIRYOKU_DOUBLE_TAP_GUARD(u_suspend, &suspend)
#else
MIRYOKU_DOUBLE_TAP_GUARD(u_bootloader, &bootloader)
#endif
#endif

View File

@ -0,0 +1,18 @@
// Copyright 2022 Manna Harbour
// https://github.com/manna-harbour/miryoku
#pragma once
#if defined (MIRYOKU_KLUDGE_DOUBLETAPBOOT)
#if defined (MIRYOKU_KLUDGE_SUSPEND)
#define U_BOOT &u_suspend
#else
#define U_BOOT &u_bootloader
#endif
#else
#if defined (MIRYOKU_KLUDGE_SUSPEND)
#define U_BOOT &suspend
#else
#define U_BOOT &bootloader
#endif
#endif

View File

@ -42,9 +42,3 @@ MIRYOKU_SHIFT_FUNCTION(u_ep_tog, &ext_power EP_TOG, &ext_power EP_OFF)
MIRYOKU_SHIFT_FUNCTION(u_caps_word, &caps_word, &kp CAPS)
#if defined(MIRYOKU_KLUDGE_SUSPEND)
MIRYOKU_SHIFT_FUNCTION(u_bootloader, &bootloader, &suspend)
#else
MIRYOKU_SHIFT_FUNCTION(u_bootloader, &bootloader, &reset)
#endif

View File

@ -19,7 +19,7 @@ Workflow builds can be customised by copying and editing one of the [[#build-exa
The [[#keyboard-keymaps][keyboard keymaps]] are composed of the config file, a [[#mapping-macros][mapping]] for the physical layout, and the [[#miryoku-keymap][Miryoku keymap]].
[[#additional-and-experimental-features][Additional and Experimental Features]] include [[#caps-word][caps word]], [[#customisation][customisation]], [[#key-emulation-combos][key emulation combos]], [[#mouse-keys][mouse keys]], and [[#𝑥MK][𝑥MK]].
[[#additional-and-experimental-features][Additional and Experimental Features]] include [[#caps-word][caps word]], [[#customisation][customisation]], [[#double-tap-boot][double tap boot]], [[#key-emulation-combos][key emulation combos]], [[#mouse-keys][mouse keys]], [[#suspend][suspend]], and [[#𝑥MK][𝑥MK]]. Open [[#issues][issues]] are also noted.
** Building
@ -427,6 +427,15 @@ Examples include ~CONFIG_ZMK_SLEEP=y~, ~CONFIG_ZMK_DISPLAY=y~, ~CONFIG_BT_CTLR_T
See https://github.com/manna-harbour/miryoku/discussions/85.
*** Double Tap Boot
[[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#additional-features][Additional features]] require a double tap to prevent accidental activation. This not supported in ZMK for the bootloader behavior on split keyboards. Use a single tap instead. See https://github.com/zmkfirmware/zmk/issues/1494.
Requiring double tap to activate the bootloader can be enabled for use with non-split keyboards. Use with split keyboards will require use of the reset button to enter the bootloader on the peripheral side.
For [[#local-builds][local builds]], add ~#define MIRYOKU_KLUDGE_DOUBLETAPBOOT~ to the [[#config-file][config file]]. For [[#workflow-builds][workflow builds]], use ~#define MIRYOKU_KLUDGE_DOUBLETAPBOOT~ with the ~custom_config~ option.
*** Key Emulation Combos
Emulate a key with a combo of two other keys. Enabled automatically on keyboards with a missing key. Can be enabled on other keyboards for use with hard to reach keys, or for compatibility.
@ -482,14 +491,12 @@ For local builds, make the changes locally.
Support for https://github.com/zmkfirmware/zmk/issues/1292#issuecomment-1264603539 is included using https://github.com/manna-harbour/zmk/tree/suspend-test and https://github.com/manna-harbour/zephyr/tree/v3.0.0+zmk-fixes-suspend-test.
To suspend, hold shift and tap the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#additional-features][boot]] key. For split keyboards, use the boot key on each side, and suspend the peripheral side first.
Suspend takes the place of the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#additional-features][boot]] key. For split keyboards, suspend the peripheral side then the central side.
To build, add ~#define MIRYOKU_KLUDGE_SUSPEND~ to the [[#config-file][config file]] and merge https://github.com/manna-harbour/zmk/tree/suspend-test.
For [[#local-builds][local builds]], add ~#define MIRYOKU_KLUDGE_SUSPEND~ to the [[#config-file][config file]] and merge https://github.com/manna-harbour/zmk/tree/suspend-test.
For [[#workflow-builds][workflow builds]] using the [[#build-inputs][Build Inputs]] workflow, use ~#define MIRYOKU_KLUDGE_SUSPEND~ with the ~custom_config~ option, and ~zmkfirmware/zmk/main manna-harbour/zmk/suspend-test~ with the ~branches~ option. For workflow builds using [[#build-examples][Build Example]] workflows, see the [[.github/workflows/build-example-suspend.yml][Build Example suspend]] workflow.
For local builds, make the changes locally.
*** 𝑥MK
@ -502,6 +509,14 @@ For [[#workflow-builds][workflow builds]] for the ~xmk~ shield, use the Build Ex
Also see [[https://github.com/manna-harbour/miryoku_kmonad][Miryoku KMonad]].
** Issues
*** No Current Layer Lock
[[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#additional-features][Current layer lock]] is not supported in ZMK. Use opposite layer lock with the opposite hand instead. See https://github.com/zmkfirmware/zmk/issues/1299.
**
[[https://github.com/manna-harbour][https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/logos/manna-harbour-boa-32.png]]