20

According to this answer over at SuperUser, OS X's terminal app should use Alt+Mouse Click to send mouse events to applications running in the terminal. I tried that with the Midnight Commander, but it does not work. I am running OS X Mavericks.

Is there any way to enable mouse support in the terminal app, short of switching to iterm2 or something like that?

1
  • What do you mean by "short of switching"? I'd recommend you to switch to iTerm. There is a SIMBL plugin provided by this answer. So I'd say, the answer to your question is no(why would they code a plugin, if there is native mouse support ;))
    – napcae
    Commented Dec 8, 2013 at 10:56

4 Answers 4

27

Indeed, OS X Terminal can receive mouse input through ⌥-clicking:

However, certain Terminal apps don't receive the passed mouse input.


You can install MouseTerm which will pass mouse events to the terminal.

  • Mouse button reporting.
  • Mouse scroll wheel reporting.
  • Simulated mouse wheel scrolling for programs like less (i.e. any fullscreen program that uses application cursor key mode).
  • Terminal profile integration (with preferences dialog).

It's a SIMBL plugin, so you'll need to install SIMBL to make it work. I recommend installing EasySIMBL instead though.

4
  • EasySIMBL plus MouseTerm works! Awesome.
    – Arne
    Commented Dec 8, 2013 at 20:00
  • Suburb! When knowing these kind of tricks makes live so much easier. Commented Mar 10, 2015 at 12:39
  • 1
    As of OS X Yosemite 10.10, Terminal has built-in support for “Simulated mouse wheel scrolling for programs like less…” This can be controlled via **Preferences > Profiles > [profile] > Keyboard > Scroll alternate screen”; it is on by default.
    – Chris Page
    Commented Nov 4, 2015 at 5:11
  • 1
    As of OS X El Capitan 10.11, Terminal supports Mouse Reporting.
    – Chris Page
    Commented Dec 16, 2015 at 2:40
17

As of OS X El Capitan 10.11, Terminal supports Mouse Reporting. You configure application programs to enable it. For example, in Vim use set mouse=a.

Terminal supports reporting three mouse buttons and a scroll-wheel, along with Shift, Meta, and Control modifiers. The Option modifier key maps to Meta (regardless of the “Option is meta” keyboard preference). You can use -Right Click for mouse-button three on a two-button device (which also works for “middle-button paste”, which invokes Edit > Paste Selection ⇧⌘V when Mouse Reporting is not active).

You can use the Fn modifier key when clicking, dragging or scrolling to temporarily bypass Mouse Reporting and interact with the terminal view. You can also use the View > Allow Mouse Reporting menu item to bypass it for longer periods of time or when Fn isn't available.

1
  • Dude, I'd like to buy you a beer.
    – squadette
    Commented Aug 4, 2016 at 15:32
2

iTerm 2 supports all mouse interactions out of the box.

0
0

At least in Terminal.app 2.6 enable "Allow Mouse Reporting" in menu "View" gives mouse support in Midnight Commander.

1
  • Allow Mouse Reporting does not enable Mouse Reporting, it allows programs to enable it using terminal commands. The purpose of this menu item is to temporarily disable MR so you can interact with the terminal view. To enable MR you must configure whatever program you want to use it, e.g., in ~/.vimrc, ~/.emacs, ~/.nanorc. You can also temporarily interact with the terminal view by pressing and holding the <kbd>Fn</kbd> modifier while clicking, selecting or scrolling with a mouse or trackpad.
    – Chris Page
    Commented Aug 6, 2015 at 5:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .