This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RXVT doesn't recognize ALT + Cursor keys


On Aug 20 22:35, Charles Wilson wrote:
> I used to have to fix my /etc/termcap. But now the /etc/termcap in 
> termcap-20050421-1.tar.bz2 says:
> 
> rxvt|rxvt terminal emulator (X Window System):\
>         :am:eo:km:mi:ms:xn:xo:\
>         :co#80:it#8:li#24:\
>         :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
>         :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
>         :RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:bl=^G:cd=\E[J:\
>         :ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:\
>         :cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:do=^J:ei=\E[4l:\
>         :ho=\E[H:i1=\E[?47l\E=\E[?1l:ic=\E[@:im=\E[4h:\
>         :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\
>         :k0=\E[21~:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:\
>         :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
>         :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\E[B:ke=\E>:\
>         :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
>         :md=\E[1m:me=\E[m\017:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
>         :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
>         :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[24m:up=\E[A:\
>         :us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
>         :vs=\E[?25h:
> rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) 
> on cygwin:\
> 
> :ac=+\257,\256-^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o
> ~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376:\
>         :tc=rxvt:

I missed to tell that I'm talking about terminfo on Linux and now that
I compare terminfo entries on different Linux distros, I see that they
disagree about the rxvt settings:

Red Hat Enterprise Linux 4:
$ rpm -qf /usr/share/terminfo/r/rxvt-basic 
ncurses-5.4-13
$ infocmp -I rxvt-basic | grep 'cu[bfu]1'
        cub1=^H, cnorm=\E[?25h, cuf1=\E[C, cuu1=\E[A, dch1=\E[P, 
        kcub1=\E[D, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kcuf1=\E[C, 

OpenSuSE 10.2:
$ rpm -qf /usr/share/terminfo/r/rxvt-basic 
terminfo-5.5-42
$ infocmp -I rxvt-basic | grep 'cu[bfu]1'
        cub1=^H, cnorm=\E[?25h, cuf1=\E[C, cuu1=\E[A, 
        kich1=\E[2~, kcub1=\EOD, kmous=\E[M, knp=\E[6~, kpp=\E[5~, 
        kcuf1=\EOC, kDC=\E[3$, kslt=\E[4~, kEND=\E[8$, kHOM=\E[7$, 
        kLFT=\E[d, kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, kcuu1=\EOA, 

> #2) For termcap, the arrow key spellings are:
>        kd=\E[B  ku=\E[A  kl=\E[D  kr=\E[C

Same picture here:

Red Hat Enterprise Linux 4:
$ rpm -qf /etc/termcap
termcap-5.4-3
The termcap entry for rxvt-basic has
	 kd=\E[B  ku=\E[A  kl=\E[D  kr=\E[C

OpenSuSE 10.2:
$ rpm -qf /etc/termcap
ncurses-5.5-42
The termcap entry for rxvt-basic has
	 kd=\EOB  ku=\EOA  kl=\EOD  kr=\EOC

> So again, I don't see where you're getting ESC O A from that.  Are you 
> sure your installed termcap and terminfo files haven't been corrupted? 

Unfortunately I was playing with the OpenSuSE installation while
debugging rxvt, and I only tested Cygwin's rxvt against the SuSE box.
Apparently the termcap/terminfo entries (same as above for the other
rxvt entries) are broken on SuSE.  Weird.  That should be a lesson to
me, I guess...

> I really believe The Right Thing To Do is to ensure /etc/termcap and 
> and/usr/share/terminfo/ are up to date, rather than make rxvt's terminal 
> handling on cygwin different than on all other platforms.

Yes, I agree.

> But even there, IF you have plain old 'rxvt' in your termcap, that's 
> usually good enough unless you're a stickler for line art characters. 
> rxvt's TERM setting defaults to xterm only because it will almost ALWAYS 
> be present, and will *mostly* work.

It doesn't have to do with line art.  If cursor and home/end keys don't
work, you have, for instance, problems moving in mutt's menus.

> Comments?

I was working under the premise that different Linux distros wouldn't
differ in such essential details.  Oh well...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]