I have a scroll trackpad for emacs + iTerm2 to work after this SO solution . For brevity, we added the following configurations to ~/.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))
source share