Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Touchpad scrolling on the mac

Tags:

emacs

I am using emacs from the shell (not aquamacs) on a mac laptop, however whenever I try to scroll up and down it doesn't scroll the file. Is there any way to do this?

like image 955
yazz.com Avatar asked Dec 17 '22 01:12

yazz.com


2 Answers

I've gotten trackpad scrolling to work for emacs + iTerm2 following this SO solution. For brevity, added the following configs to my ~/.emacs:

;; mouse integration
(require 'mouse) ;; needed for iterm2 compatibility
(xterm-mouse-mode t)
(global-set-key [mouse-4] '(lambda ()
                           (interactive)
                           (scroll-down 1)))
(global-set-key [mouse-5] '(lambda ()
                           (interactive)
                           (scroll-up 1)))
(setq mouse-sel-mode t)
(defun track-mouse (e))
like image 126
epylinkn Avatar answered Dec 28 '22 08:12

epylinkn


Normally holding down the 'shift' key will let you do this on xterm and friends. See if that works. Also try M-x xterm-mouse-mode which should also yield some functionality. Note that these will prob only scroll the cursor but that should be good enough.

like image 29
yonkeltron Avatar answered Dec 28 '22 09:12

yonkeltron