Add leader sequences for system and output control

This commit is contained in:
urob 2024-12-16 23:54:54 -05:00
parent fb9230e3c1
commit ea0538ffba
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include <dt-bindings/zmk/keys.h>
#ifdef CONFIG_WIRELESS
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>
#define _BT_SEL_KEYS_ &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_CLR
#else
#define _BT_SEL_KEYS_ &trans &trans &trans &trans &trans

View file

@ -5,6 +5,7 @@
leader: leader { \
compatible = "zmk,behavior-leader-key"; \
#binding-cells = <0>; \
ignore-keys = <LSHFT RSHFT>; \
leader_sequence_ ## name { \
bindings = <leader_bindings>; \
sequence = <leader_sequence>; \
@ -44,3 +45,12 @@ ZMK_LEADER_SEQUENCE(el_phi, &el_phi, E F) // ϕ
ZMK_LEADER_SEQUENCE(el_chi, &el_chi, E C) // χ
ZMK_LEADER_SEQUENCE(el_psi, &el_psi, E Y) // ψ
ZMK_LEADER_SEQUENCE(el_omega, &el_omega, E W) // ω
// BLE and USB
#ifdef CONFIG_WIRELESS
ZMK_LEADER_SEQUENCE(usb, &out OUT_USB, U S B)
ZMK_LEADER_SEQUENCE(ble, &out OUT_BLE, B L E)
#endif // CONFIG_WIRELESS
ZMK_LEADER_SEQUENCE(reset, &sys_reset, R E S E T)
ZMK_LEADER_SEQUENCE(boot, &bootloader, B O O T)