bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: why doesn't putty have smkx/rmkx?


From: Thomas Dickey
Subject: Re: Q: why doesn't putty have smkx/rmkx?
Date: Sat, 16 Jan 2016 17:59:50 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jan 11, 2016 at 02:52:19PM +0100, Leonardo Brondani Schenkel wrote:
> Hi,
> 
> Does anybody know why are 'smkx' and 'rmkx' not included in the 'putty'
> entry? PuTTY *does* support that functionality:

yes/no: PuTTY recognizes the switch, but the person who wrote the original
"putty" description was probably one of those bash-users who didn't need
application mode...

Without setting the mode, we have unshifted keys:

        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,

and shifted keys:

        kLFT=\EOD, kRIT=\EOC, 
        kind=\EOB, kri=\EOA,

So all that the shift (or control) modifier does for PuTTY is toggle
between normal/application mode.

"bash-users" is the explanation for the "linux" entry lacking application
mode, of course.  I added "xterm-noapp" a while back, to see if I could
pry those away from hardcoded escapes in .inputrc, but had no measurable
success.

I can do that for putty: move the existing definition to "putty-noapp"
and amend "putty" to use application mode.  (I think it's too late for
"linux-noapp").  It's probably not a huge impact, due to PuTTY's insisting
on setting TERM to "xterm".
 
> smkx=\E[?1h\E=
> rmkx=\E[?1l\E>
> 
> Due to the absence of the above entries, apps can't switch to
> application mode: that is probably why in terminfo the
> up/down/left/right keys (and their shifted counterparts) contain the
> normal mode sequences instead of the application mode sequences (as it
> is customary in ncurses).
> 
> These are the correct sequences when in application mode:
> 
> kLFT=\E[D
> kRIT=\E[C
> kcub1=\EOD
> kcud1=\EOB
> kcuf1=\EOC
> kcuu1=\EOA
> kind=\E[B
> kri=\E[A

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]