How can I get mouse selection to work in emacs and iTerm2 on Mac?

后端 未结 4 1395
遇见更好的自我
遇见更好的自我 2020-12-23 02:03

after turning on xterm-mouse-mode, any click on the in the screen returns \"mouse-1 is undefined\". What should I be defining \"mouse-1\" as? Is there some reason my mouse

4条回答
  •  长情又很酷
    2020-12-23 02:31

    Mac OS X's Terminal.app does not support mouse reporting. However MouseTerm is a SIMBL plugin that provides it with this feature. http://bitheap.org/mouseterm/

    Install MouseTerm and put the following in your Emacs config file:

    ; enable mouse reporting for terminal emulators
    (unless window-system
      (xterm-mouse-mode 1)
      (global-set-key [mouse-4] (lambda ()
                                  (interactive)
                                  (scroll-down 1)))
      (global-set-key [mouse-5] (lambda ()
                                  (interactive)
                                  (scroll-up 1))))
    

提交回复
热议问题