]> git.eshelyaron.com Git - emacs.git/commitdiff
Make precision scrolling also work on various bars
authorPo Lu <luangruo@yahoo.com>
Thu, 23 Dec 2021 13:35:46 +0000 (21:35 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 23 Dec 2021 13:35:46 +0000 (21:35 +0800)
* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map):
Define keys for various kinds of bars.

lisp/pixel-scroll.el

index 975c5133f11ab213d78d73c4d04d4c956ef26da4..d3b45000239543be710a3c4656cda5ba14f74cf6 100644 (file)
@@ -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'.")