Last active
October 1, 2025 00:34
-
-
Save partrita/7ef85f00d54f1c16fae159e613e83ae0 to your computer and use it in GitHub Desktop.
my kanata.kbd file for linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; check out, https://github.com/jtroo/kanata | |
| ;; Caps lock key for hangul, left alt <-> left ctrl key for ergonomics | |
| ;; pressed LControl+Space+Escape, exiting. | |
| ;; (defcfg | |
| ;; process-unmapped-keys yes | |
| ;; ) | |
| (defsrc | |
| grv 1 2 3 4 5 6 7 8 9 0 - = bspc | |
| tab q w e r t y u i o p [ ] \ | |
| caps a s d f g h j k l ; ' ret | |
| lsft z x c v b n m , . / rsft | |
| lctl lmet lalt spc ralt rmet rctl | |
| ) | |
| (deflocalkeys-win | |
| han 21 | |
| ) | |
| (deflocalkeys-linux | |
| han 100 ;; alt_r | |
| ) | |
| (defvar | |
| ;; Note: consider using different time values for your different fingers. | |
| ;; For example, your pinkies might be slower to release keys and index fingers faster. | |
| tap-time 200 | |
| hold-time 200 | |
| ) | |
| (defalias | |
| ;; toggle layer aliases | |
| nav (layer-toggle nav) | |
| win (layer-switch win) | |
| mac (layer-switch mac) | |
| col (layer-switch col) | |
| ;; tap-hold keys with letters for tap and layer change for hold | |
| spl (tap-hold-release $tap-time $hold-time spc @nav) | |
| ;; tap for lctl, hold for caps | |
| cap (tap-hold-release $tap-time 2000 han caps) | |
| ;; home-row shift | |
| f (tap-hold $tap-time $hold-time f lsft) | |
| j (tap-hold $tap-time $hold-time j rsft) | |
| ;; Mouse movement actions with linear acceleration. | |
| ;;The first number is the interval in milliseconds between mouse actions. | |
| ;; The second number is the time in milliseconds for the distance to linearly ramp up from the minimum distance to the maximum distance. | |
| ;; The third number is the minimum distance traveled per interval in pixels. | |
| ;; The fourth number is the maximum distance traveled per interval in pixels. | |
| ma↑ (movemouse-accel-up 1 1000 1 5) | |
| ma← (movemouse-accel-left 1 1000 1 5) | |
| ma↓ (movemouse-accel-down 1 1000 1 5) | |
| ma→ (movemouse-accel-right 1 1000 1 5) | |
| ;; Mouse wheel actions. | |
| ;; The first number is the interval in milliseconds between scroll actions. ;; The second number is the distance in some arbitrary unit. Play with the parameters to see what feels correct. Both numbers must be in the range 1-65535 | |
| ;; In both Windows and Linux, 120 distance units is equivalent to a single notch movement on a physical wheel. In Linux, not all desktop environments | |
| ;; support the REL_WHEEL_HI_RES event so if you experience issues with `mwheel` actions in Linux, using a distance value that is multiple of 120 may help. | |
| mwu (mwheel-up 50 120) | |
| mwd (mwheel-down 50 120) | |
| mwl (mwheel-left 50 120) | |
| mwr (mwheel-right 50 120) | |
| ) | |
| (deflayer win | |
| grv 1 2 3 4 5 6 7 8 9 0 - = bspc | |
| tab q w e r t y u i o p [ ] \ | |
| @cap a s d f g h j k l ; ' ret | |
| lsft z x c v b n m , . / rsft | |
| lctl lmet lalt @spl ralt rmet rctl | |
| ) | |
| (deflayer mac | |
| grv 1 2 3 4 5 6 7 8 9 0 - = bspc | |
| tab q w e r t y u i o p [ ] \ | |
| @cap a s d f g h j k l ; ' ret | |
| lsft z x c v b n m , . / rsft | |
| lalt lmet lctl @spl ralt rmet rctl | |
| ) | |
| (deflayer col | |
| grv 1 2 3 4 5 6 7 8 9 0 - = bspc | |
| tab q w f p b j l u y ; [ ] \ | |
| @cap a r s t g m n e i o ' ret | |
| lsft z x c d v k h , . / rsft | |
| lalt lmet lctl @spl ralt rmet rctl | |
| ) | |
| (deflayer nav | |
| esc f1 f2 f3 f4 f5 XX XX XX XX @win @mac @col bspc | |
| _ mlft @ma↑ mrgt @mwu XX home pgdn pgup end XX XX XX del | |
| esc @ma← @ma↓ @ma→ @mwd XX left down up rght XX XX _ | |
| _ XX XX XX XX home pgdn pgup end XX XX _ | |
| _ _ _ _ _ _ _ | |
| ) | |
| ;; Remap Ctrl+Tab to work as Alt+Tab | |
| (defvirtualkeys v-lalt lalt) | |
| (deflayermap (l-lctl) | |
| tab (fork (multi lalt | |
| (on-press press-vkey v-lalt) | |
| (release-key lctl) | |
| tab) | |
| tab | |
| (lalt))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment