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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

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

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

Closing this for a lack of response.

Benno Schulenberg <bens>
Group administrator
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>
Group administrator
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:

TERM=screen
TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\
:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
:do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
:le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
:li#33:co#169:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
:cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
:im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\
:ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34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kl=\EOD:kb=^H:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:F3=\E[25~:F4=\E[26~:F5=\E[28~:F6=\E[29~:\
:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
:kh=\E[1~:kI=\E[2~:kD=\E[3~:@7=\E[4~:kP=\E[5~:\
:kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\
:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
:Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:

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

xterm|xterm-color|X11 terminal emulator:\
:ti@:te@:tc=xterm-xfree86:

xterm-xfree86|XFree86 xterm:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:@7=\EOF:@8=\EOM:kI=\E[2~:\
:kh=\EOH:kP=\E[5~:kN=\E[6~:\
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:Km=\E[M:tc=xterm-basic:
#
# This chunk is used for building the VT220/Sun/PC keyboard variants.
xterm-basic|xterm common (XFree86):\
:li#24:co#80:am:kn#12:km:mi:ms:xn:AX:bl=^G:\
:is=\E[!p\E[?3;4l\E[4l\E>:rs=\E[!p\E[?3;4l\E[4l\E>:le=^H:\
:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:al=\E[L:dc=\E[P:dl=\E[M:\
:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:\
:ho=\E[H:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:\
:im=\E[4h:ei=\E[4l:ks=\E[?1h\E=:ke=\E[?1l\E>:kD=\E[3~:kb=^H:\
:sf=\n:sr=\EM:st=\EH:ct=\E[3g:sc=\E7:rc=\E8:\
:eA=\E(B\E)0:as=\E(0:ae=\E(B:ml=\El:mu=\Em:up=\E[A:nd=\E[C:\
:md=\E[1m:me=\E[m:mr=\E[7m:so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\
:ti=\E[?1049h:te=\E[?1049l:vi=\E[?25l:ve=\E[?25h:\
:ut:Co#8:pa#64:op=\E[39;49m:AB=\E[4%dm:AF=\E[3%dm:

Best,

Dan

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

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.13-02a9.
    Corresponding source code