bugGNU nano - Bugs: bug #26719, Mouse only works when TERM is...


bug #26719: Mouse only works when TERM is "xterm"

Submitted by:  Dan Mahoney <gushi>
Submitted on:  Mon 01 Jun 2009 11:58:03 PM UTC  
Severity:  3 - Normal Status:  Need Info
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 11 Apr 2017 12:18:10 PM UTC, comment #4:

Closing this for a lack of response.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 29 Aug 2016 08:10:05 PM UTC, comment #3:

Have you tried editing the /etc/termcap entry for screen? Adding after "kb=^H:\" this string for the mouse: ":Km=\E[M\".

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 23 Feb 2014 09:10:41 PM UTC, comment #2:

Okay, so this is under FreeBSD, which is termcap, not terminfo based.

It's my understanding that screen does some magic to translate the actual terminal it's running on and present that to an application in the form of the TERMCAP environment variable.

All I know is that with term type "screen" set, mouse doesn't work, if I do a setenv TERM xterm, it does. If gnu screen's not doing some special magic to look at that name directly, then the answer pretty much has to be here:

It also sets TERM, which should cause nano to use whatever's in /etc/termcap.db

I can paste in what's in "env" and what's in the requisite files:

TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\

From /etc/termcap:

SC|screen|VT 100/ANSI X3.64 virtual terminal:\

...and the chain that builds the xterm here.

xterm|xterm-color|X11 terminal emulator:\

xterm-xfree86|XFree86 xterm:\
# This chunk is used for building the VT220/Sun/PC keyboard variants.
xterm-basic|xterm common (XFree86):\



Dan Mahoney <gushi>
Tue 18 Aug 2009 03:14:54 AM UTC, comment #1:

hi Dan,

Sorry for the delay. On my ubuntu box it seems that I can use a TERM valuie of 'screen-256color', and mouse support will work under nano. According to the manual page for ncurses mouse support, mouse(3), the terminfo definition has to have a ?1000 entry (or XM) in order to support the curses-based mouse support. I hope this helps.

Chris Allegretta <astyanax>
Project Administrator
Mon 01 Jun 2009 11:58:03 PM UTC, original submission:

Hey there.

I'm using a mouse under screen. (And normally that's my terminal type, "screen").

I can't tell by reading the source, but it appears that the mouse support only comes on when my terminal is "xterm". Nano version is 2.0.9.

If you could tell me how nano determines if a console supports a mouse, I might be able to offer better testing.

-Dan Mahoney

Dan Mahoney <gushi>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by astyanax (Posted a comment)
  • -email is unavailable- added by gushi (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-11 bens Open/ClosedOpen => Closed
    2016-08-29 bens Assigned toastyanax => bens
    2014-02-23 bens StatusNone => Need Info
    2009-08-18 astyanax Assigned toNone => astyanax

    Back to the top

    Powered by Savane 3.3