On 07/05/2015 13:48, Nicholas Marriott wrote:
> +tmux-users
> 
> 
> On Thu, May 07, 2015 at 10:01:03AM +0100, Nicholas Marriott wrote:
>> Hi
>>
>> Well that explains it, since you have kLFT3=\Eb tmux will send M-Left
>> instead of M-b for \Eb (and Option+Left since your terminal sends \Eb
>> for that too).

All right, so just to make sure that I understand the logic...

When TERM is 'xterm-256color':
1. tmux receives an \Eb from the terminal
2. tmux does not recognize the sequence (not in terminfo)
3. tmux forwards this sequence "as is" to the application

When TERM is 'nsterm':
1. tmux receives an \Eb from the terminal
2. tmux notices that \Eb is kLFT3 (Alt+Left) in terminfo
3. tmux translates Alt+Left into KEYC_LEFT|KEYC_ESCAPE (tty-keys.c)
4. tmux KEYC_LEFT is ^[[D or ^[OD, depending on the mode
5. tmux sends KEYC_LEFT|KEYC_ESCAPE to the application

Makes perfect sense. However, since I get ^[[D or ^[OD in cat, where did
KEYC_ESCAPE go? Shouldn't I be getting ^[^[[D or ^[^[OD instead? What am
I missing here? It looks to me that I'm pressing Alt/Option+Left in the
terminal but the app is receiving just a Left, and the Alt went missing.

// Leonardo.

>>
>>
>>
>> On Thu, May 07, 2015 at 10:51:52AM +0200, Leonardo Brondani Schenkel wrote:
>>> On 07/05/15 09:58, Nicholas Marriott wrote:
>>>> "new key ^[b: 0x301f (M-Left)"
>>>> Are you sure your tmux is unmodified?
>>>
>>> It's the version available on MacPorts. As far as I can see it does not
>>> patch tmux in any significant way:
>>> https://trac.macports.org/browser/trunk/dports/sysutils/tmux?rev=132936
>>>
>>> Actually tmux 2.0 just landed in MacPorts but I didn't install it yet.
>>> I can upgrade to it and repeat the experiment if it might help.
>>>
>>>> Did you use "infocmp -x" when dumping the terminfo entries you sent? If
>>>> not, try "infocmp -x nsterm" and look for kLFT3.
>>>
>>> No, sorry, I overlooked that and didn't use "-x". The output with "-x"
>>> is listed below. kLFT3 is not there, but I checked my terminfo sources
>>> (I'm using a custom ~/.terminfo compiled from the latest database:
>>> version 1.536) and KLFT3 *is* present (in fact I was the one who
>>> actually suggested these new capabilities/entries in the ncurses mailing
>>> list in the first place):
>>>
>>> nsterm-build326|Terminal.app in OS X 10.9,
>>>         kDC=\E[3;2~, kLFT=\E[1;2D, kRIT=\E[1;2C, kcbt=\E[Z,
>>>         kf18=\E[32~, kDC5=\E[3;5~, kDC7=\E[3;5~, kLFT3=\Eb,
>>>         kLFT5=\E[1;5D, kRIT3=\Ef, kRIT5=\E[1;5C,
>>>         use=nsterm-256color,
>>> # actually "343.7"
>>> nsterm-build343|Terminal.app in OS X 10.10,
>>>         kend=\EOF, khome=\EOH, use=nsterm-build326,
>>> # This is an alias which should always point to the "current" version
>>> nsterm|Apple_Terminal|AppKit Terminal.app,
>>>         use=nsterm-build343,
>>>
>>>
>>> $ infocmp -x
>>> #   Reconstructed via infocmp from file:
>>> /Users/Leonardo/.local/share/terminfo/6e/nsterm
>>> nsterm|Apple_Terminal|AppKit Terminal.app,
>>>     am, bce, hs, mir, msgr, npc, xenl, xon,
>>>     colors#256, cols#80, it#8, lines#24, pairs#32767, wsl#50,
>>>     acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
>>>     bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
>>>     clear=\E[H\E[J, cnorm=\E[?25h, cr=^M,
>>>     csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
>>>     cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
>>>     cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
>>>     dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
>>>     dl1=\E[M, dsl=\E]2;\007, ed=\E[J, el=\E[K, el1=\E[1K,
>>>     enacs=\E(B\E)0, flash=\E[?5h$<200/>\E[?5l, fsl=^G,
>>>     home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
>>>     ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m,
>>>     kDC=\E[3;2~, kLFT=\E[1;2D, kRIT=\E[1;2C, ka1=\EOq,
>>>     ka3=\EOs, kb2=\EOr, kbs=\177, kc1=\EOp, kc3=\EOn, kcbt=\E[Z,
>>>     kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
>>>     kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
>>>     kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
>>>     kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
>>>     kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS,
>>>     kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
>>>     khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m, rc=\E8,
>>>     rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
>>>     rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
>>>     rmso=\E[m, rmul=\E[m,
>>>     rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
>>>     setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
>>>     setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
>>>     
>>> sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
>>>     sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h,
>>>     smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
>>>     tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
>>>     u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, TS=\E]2;,
>>>     kDC5=\E[3;5~, kDC7=\E[3;5~, kLFT3=\Eb, kLFT5=\E[1;5D,
>>>     kRIT3=\Ef, kRIT5=\E[1;5C,
>>>
>>>>
>>>>
>>>> On Thu, May 07, 2015 at 09:43:15AM +0200, Leonardo Brondani Schenkel wrote:
>>>>> On 07/05/15 00:31, Thomas Adam wrote:
>>>>>>     TERM=nsterm tmux -vvvv -Ltest -f/dev/null new
>>>>>
>>>>> Log files are attached: I started tmux as directed, invoked "cat",
>>>>> pressed Option/Alt+Left three times, then Enter/Return, then Ctrl+D
>>>>> twice. This was done twice, one with TERM=nsterm (filename suffix
>>>>> -nsterm) and one with TERM=xterm-256color (filename suffix -xterm).
>>>>>
>>>>> // Leonardo.
>>>>>
>>>>
>>>>> got 207 from server
>>>>> got 203 from server
>>>>> got 204 from server
>>>>
>>>>> got 207 from server
>>>>> got 203 from server
>>>>> got 204 from server
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud 
>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>
>>>>> _______________________________________________
>>>>> tmux-users mailing list
>>>>> tmux-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/tmux-users
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> One dashboard for servers and applications across Physical-Virtual-Cloud 
>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>
>>>
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> 



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to