From e94e8ee93afa700f2359e7fce1ae87ea1bb1b368 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sat, 5 Apr 2025 00:54:20 +0800 Subject: [PATCH] feat(kanata): make spacebar act as super key --- modules/programs/kanata.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/programs/kanata.nix b/modules/programs/kanata.nix index cc1b92b..11698d8 100644 --- a/modules/programs/kanata.nix +++ b/modules/programs/kanata.nix @@ -17,8 +17,18 @@ (deflayermap (default-layer) ;; tap caps lock as enter, hold as left ctrl - caps (tap-hold-release $tt $ht esc lctl) - Space (tap-dance $ht (Space return)) + ;; tap-hold-release will activate the hold action early + ;; if another key is pressed while it is held. + CapsLock (tap-hold-release 200 200 Escape ControlLeft) + + ;; space if pressed twice in quick succession will + ;; enter a space then delete it and put enter + Space (tap-hold-release 200 200 + (tap-dance-eager 200 ( + (macro Space) ;; use macro to prevent auto repeat + (macro Backspace Enter) + )) + MetaRight) ) ''; };