As of OS X 10.11 El Capitan, Terminal supports Mouse Reporting.
Note that programs that support Mouse Reporting must enable it via escape sequences, and that most programs that support Mouse Reporting must be configured to enable it. For example, in Vim you must execute set mouse=a
(usually in your ~/.vimrc
file).
Terminal supports reporting three mouse buttons and a scroll wheel. To simulate a button-three press with a two-button device, you can use Command-Right-Click. (Command-Right-Click also performs Edit > Paste Selection when Mouse Reporting is off, so Middle-Click will paste the most-recently selected text whether you're using Mouse Reporting or not.)
When Mouse Reporting is enabled, the Option ⌥ modifier key is mapped to Meta for clicking and scrolling, and is unaffected by the “Use Option as Meta key” Keyboard preference, which only applies to keyboard input.
To temporarily bypass Mouse Reporting and interact with the terminal view, press the Fn modifier key while clicking or scrolling. There is also a View > Allow Mouse Reporting (⌘R) menu item you can use to bypass Mouse Reporting for longer periods of time, or if the modifier key isn't available.
Note that, when enabled, Mouse Reporting supersedes Terminal's existing Option-Click behavior (which sends arrow-key input to move the cursor) and “Scroll alternate screen” behavior. Also, the new Allow Mouse Reporting menu item and the Fn modifier also apply to “Scroll alternate screen” to let you temporarily bypass this behavior.
What does xterm support that Terminal doesn't? Copy-on-highlight and middle-paste? – Ignacio Vazquez-Abrams – 2010-03-28T08:44:44.800
The mouse reporting. It's the real mouse support. The copy-on-highlight, middle-paste, etc. are not really related to Terminal as far as I know. – None – 2010-03-28T09:25:12.407
2copy-on-highlight and middle-paste ate Terminal related - in that Terminal does not do them - you could try iTerm for those – user151019 – 2010-03-28T09:53:53.993
@Mark: I checked it and liked it. Though Terminal handles far better bold characters. Anyway, thanks. – None – 2010-03-28T11:32:48.383
I still don't understand what you'd expect from mouse support (other than copy/paste, which is supported -- see http://superuser.com/questions/62609/mac-terminal-copy-on-select-like-putty/62659#62659). Like: what do you expect when running
– Arjan – 2010-03-28T20:33:11.040ls
and then positioning the mouse somewhere in that output?2@Arjan: some interactive CLI apps support the mouse; for instance, positioning the text cursor in
vim
. – ELLIOTTCABLE – 2011-11-21T16:40:57.197