Skip to content

Commit f5ccc7e

Browse files
committed
feat(kanata): add cross-platform quit shortcut on HRM nav layer
- @qut → [Q] - @pad → [W] Rationale: - @qut allows closing apps on any OS (C-q on Linux, A-f4 on Windows, etc.), optimizing muscular memory - it is more coherent to map @qut on [Q]
1 parent f9115ea commit f5ccc7e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

kanata/deflayer/navigation_vim_hrm.kbd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
;; Vim-Navigation layer (optimized for home-row mods):
22
;; - right: Vim-like arrows on HJKL, home/end page up/down, mouse scroll
3-
;; - left: Tab/Shift-Tab, prev/next
3+
;; - left: Tab/Shift-Tab, prev/next, quit
44
;; - top: Super-num (i3/sway) or Alt-num (browser), zoom in/out
55

66
;; The `lrld` action stands for "live reload". This will re-parse everything
77
;; except for linux-dev, i.e. you cannot live reload and switch keyboard devices.
88

99
(deflayer navigation
1010
M-1 M-2 M-3 M-4 M-5 lrld M-6 M-7 M-8 M-9 M-0
11-
@pad XX bck fwd XX home pgdn pgup end @run
11+
@qut @pad bck fwd XX home pgdn pgup end @run
1212
XX S-tab tab tab XX lft down up rght @fun
1313
XX XX XX XX XX _ @mwl @mwd @mwu @mwr XX
1414
del _ esc
@@ -38,6 +38,10 @@
3838

3939
fun (layer-while-held funpad)
4040

41+
;; Replace XX by the keyboard shortcut to quit applications on your OS.
42+
;; qut C-q ;; [Command]-[Q]
43+
qut XX ;; do nothing
44+
4145
;; Mouse wheel emulation
4246
mwu (mwheel-up 50 120)
4347
mwd (mwheel-down 50 120)

kanata/kanata.kbd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
(include deflayer/navigation.kbd) ;; ESDF on the left, NumPad on the right
6161
;; (include deflayer/navigation_vim.kbd) ;; HJKL + NumPad on [Space]+[Q]
62-
;; (include deflayer/navigation_vim_hrm.kbd) ;; HJKL + NumPad on [Space]+[Q], optimized for home-row mods
62+
;; (include deflayer/navigation_vim_hrm.kbd) ;; HJKL + NumPad on [Space]+[W], optimized for home-row mods
6363

6464
;; Replace XX by the keyboard shortcut of your application launcher, if any.
6565
;; Mapped on [Space]+[P] in both navigation layers.

0 commit comments

Comments
 (0)