mirror of
https://github.com/ClaytonWWilson/miryoku_zmk.git
synced 2026-03-11 03:05:03 +00:00
Add double tap guard for Additional Features
- Add Issues - Fix suspend - Add MIRYOKU_KLUDGE_DOUBLETAPBOOT
This commit is contained in:
28
miryoku/miryoku_double_tap_guard.dtsi
Normal file
28
miryoku/miryoku_double_tap_guard.dtsi
Normal 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
|
||||
Reference in New Issue
Block a user