From f9d518bc2f333e03d5e7c4e935b08fbe19f33c5b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 23 Dec 2021 21:35:46 +0800 Subject: [PATCH] Make precision scrolling also work on various bars * lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Define keys for various kinds of bars. --- lisp/pixel-scroll.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 975c5133f11..d3b45000239 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -99,6 +99,15 @@ is always with pixel resolution.") (define-key map [wheel-down] #'pixel-scroll-precision) (define-key map [wheel-up] #'pixel-scroll-precision) (define-key map [touch-end] #'pixel-scroll-start-momentum) + (define-key map [mode-line wheel-down] #'pixel-scroll-precision) + (define-key map [mode-line wheel-up] #'pixel-scroll-precision) + (define-key map [mode-line touch-end] #'pixel-scroll-start-momentum) + (define-key map [header-line wheel-down] #'pixel-scroll-precision) + (define-key map [header-line wheel-up] #'pixel-scroll-precision) + (define-key map [header-line touch-end] #'pixel-scroll-start-momentum) + (define-key map [vertical-scroll-bar wheel-down] #'pixel-scroll-precision) + (define-key map [vertical-scroll-bar wheel-up] #'pixel-scroll-precision) + (define-key map [vertical-scroll-bar touch-end] #'pixel-scroll-start-momentum) map) "The key map used by `pixel-scroll-precision-mode'.") -- 2.39.2