In the OS X Terminal, we can use the mouse or trackpad to scroll in programs that use the alternate screen, such as less.

This used to be possible in nano as well, both for local sessions as well as ssh'ed into a remote machine.
Scrolling would effectively move the cursor, as if the / keys were used extremely rapidly.
As of OS X 10.10 or 10.11 (not sure which), this no longer works.
It seems that since one of those updates, I am able to position the cursor by clicking, set marks, etc. (i.e. mouse support is enabled and working), but I can no longer scroll.

I know that I can navigate by a whole lot of keyboard commands, but I can scroll a lot faster on my trackpad, and it would also use soft scrolling, as opposed to the whole-page-jumps caused by PgUp/PgDn.

Is there any way I can bring that scrolling functionality back through configuration or either the Terminal or nano?


Okay, it's one of those too-simple-to-try things.
You have to disable mouse support.

In .nanorc, write:

unset mouse

Or use EscM to toggle mouse support from within nano.

I hope this saves someone a day of searching.

  • Yes, rather counter-intuitive (disable mouse support to be able to use the mouse to scroll). It seems it's one or the other with Nano. You can have mouse support, which will allow for repositioning the cursor by clicking with the mouse, but with no scrolling; or, you can disable mouse support, which will allow scrolling, but no clicking. Thanks for posting this keyboard shortcut. At long last I can switch between the two options during a Nano session. Very happy. – inspirednz Oct 8 '17 at 4:09
  • Wow. Amazingly counterintuitive... I'd really love to position the cursor by clicking and then scroll down ^^ Thanks for the shortcut here as well – Julian F. Weinert Jun 7 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.