Created
March 23, 2025 14:18
-
-
Save honboubao/59ef0c49e82795b613a43f90af0e83fe to your computer and use it in GitHub Desktop.
Kanata (https://github.com/jtroo/kanata) config to activate mod keys and enable fast scrolling when mouse buttons are being held for more than 300ms.
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
(defvar | |
tap-time 200 | |
fast-scroll 1200 | |
) | |
(defsrc | |
mfwd | |
mbck | |
mmid | |
mwu | |
mwd | |
) | |
(defvirtualkeys | |
sftx lsft | |
ctlx lctl | |
) | |
(defalias | |
psf (on-press press-virtualkey sftx) | |
rsf (on-release release-virtualkey sftx) | |
tsf (multi @psf @rsf) | |
pct (on-press press-virtualkey ctlx) | |
rct (on-release release-virtualkey ctlx) | |
tct (multi @pct @rct) | |
) | |
(deflayer base | |
(tap-hold $tap-time $tap-time mfwd @tct) | |
(tap-hold $tap-time $tap-time mbck @tsf) | |
(tap-hold $tap-time $tap-time mmid lalt) | |
(switch | |
((and lsft lctl)) (macro @rsf @rct 10 (mwheel-up 50 $fast-scroll) 10 @psf @pct) break | |
() (mwheel-up 50 120) break | |
) | |
(switch | |
((and lsft lctl)) (macro @rsf @rct 10 (mwheel-down 50 $fast-scroll) 10 @psf @pct) break | |
() (mwheel-down 50 120) break | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment