touchpad horizontal scrolling in emacs
emacs, mouse, scroll
Solution
Put this in your .emacs-file:
;; Turn on horizontal scrolling with mouse wheel
(global-set-key (kbd "<mouse-6>") 'scroll-right)
(global-set-key (kbd "<mouse-7>") 'scroll-left)
When you first use it, emacs will ask you if you want to activate the restricted command scroll-left. That's just because some users find it confusing at first.
Problem
app on Mac OS X on a MacBook. Most applications on the computer allow me to scroll both vertically and horizontally with a two-finger drag on the trackpad. I would like to use this ability to position the cursor in emacs. Adding the following lines to .emacs allows me to move the cursor vertically: ``` (global-set-key [wheel-up] 'previous-line) (global-set-key [wheel-down] 'next-line) ``` I don't know of an equivalent setting for wheel-left or wheel-right. Can anyone help?