Adds xterm mouse reporting to Terminal.app
Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
English.lproj Add preferences support Jul 22, 2010
French.lproj Localize menu item title and add French translation Jul 19, 2010
utils Add scripts for reporting primary/secondary device attributes Jun 17, 2010
.gitignore Renamed EscapeParser* to MTParser* Jul 5, 2010
Info.plist Update version to 1.0b1 Sep 7, 2010
Install.scpt Fixed typo in install script May 9, 2008
JRSwizzle.h Initial import May 7, 2008
JRSwizzle.m Updated JRSwizzle Sep 2, 2009
LICENSE.txt Updated Makefile with builddmg command, updated README with FAQs and … May 8, 2008
MTAppPrefsController.h Add preferences support Jul 22, 2010
MTAppPrefsController.m Add preferences support Jul 22, 2010
MTParser.h Renamed EscapeParser* to MTParser* Jul 5, 2010
MTParser.rl support SGR/urxvt styled mouse reporting Jun 4, 2012
MTParserState.h Renamed EscapeParser* to MTParser* Jul 5, 2010
MTParserState.m Renamed EscapeParser* to MTParser* Jul 5, 2010
MTProfile.h Add preferences support Jul 22, 2010
MTProfile.m Add preferences support Jul 22, 2010
MTShell.h support SGR/urxvt styled mouse reporting Jun 4, 2012
MTShell.m support SGR/urxvt styled mouse reporting Jun 4, 2012
MTTabController.h Fix category names Jun 25, 2010
MTTabController.m Move SDA_RESPONSE* into Mouse.h Jul 5, 2010
MTView.h support SGR/urxvt styled mouse reporting Jun 4, 2012
MTView.m support SGR/urxvt styled mouse reporting Jun 4, 2012
Makefile Add preferences support Jul 22, 2010
Mouse.h support SGR/urxvt styled mouse reporting Jun 4, 2012
MouseTerm.h Add preferences support Jul 22, 2010
MouseTerm.m Add preferences support Jul 22, 2010
README.md Update README with beta blurb Sep 7, 2010
Terminal.h support SGR/urxvt styled mouse reporting Jun 4, 2012
Uninstall.scpt Updated Makefile with builddmg command, updated README with FAQs and … May 8, 2008

README.md

MouseTerm

MouseTerm is a SIMBL plugin for Mac OS X's Terminal.app that passes mouse events to the terminal, allowing you to use mouse shortcuts within applications that support them.

To get started, first install SIMBL (MouseTerm won't work without it!). Once you've done that, open the .dmg file, run Install, and restart Terminal.app. To uninstall, run Uninstall from the .dmg.

Download

Status

MouseTerm is currently beta quality software. It's feature complete, but still needs testing.

What works:

  • 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).

What's being worked on:

  • A nicer preferences dialog.

Frequently Asked Questions

What programs can I use the mouse in?

This varies widely and depends on the specific program. less, Emacs, and Vim are good places to test out mouse reporting.

How do I disable mouse reporting temporarily?

Use "Send Mouse Events" in the Shell menu.

How do I configure mouse reporting on a profile basis?

In the preferences dialog under Settings, you can configure terminal profiles. Select the profile you want to configure, go to the Keyboard section, and click the "Mouse..." button to change what mouse buttons are reported to programs in the terminal.

How do I enable mouse reporting in Vim?

To enable the mouse for all modes add the following to your ~/.vimrc file:

if has("mouse")
    set mouse=a
endif

Run :help mouse for more information and other possible values.

What about enabling it in Emacs?

By default MouseTerm will use simulated mouse wheel scrolling in Emacs. To enable terminal mouse support, add this to your ~/.emacs file:

(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))))

Development

Download the official development repository using Git:

git clone git://github.com/brodie/mouseterm.git

Run make to compile the plugin, and make install to install it into your home directory's SIMBL plugins folder. make test will install the plugin and run a second instance of Terminal.app for testing.

Visit GitHub if you'd like to fork the project, watch for new changes, or report issues.

JRSwizzle and some mouse reporting code from iTerm are used in MouseTerm. Ragel is used for parsing control codes.

Contact

Contact information can be found on my site, brodierao.com.

Thanks to Tom Feist and Scott Kroll for their contributions.