Re: patch: C-PGUP/DN will work in GNU screen in xterm



> I think it's a pretty dirty hack.  WINDOWID doesn't mean that you are
> running xterm.  It may be another terminal emulator.
>

OK, I've been mulling this over, and have installed some extra terminals
and been doing some testing....

First point: on any showing we should add something like

   || (!strncmp (term, "rxvt", 4))

to init_key.

because, after all, those

    /* rxvt keys with modifiers */

are part of xterm_key_defines....

....and, without *that* patch C-PGDN/UP *don't work* in rxvt, aterm, and
wterm; but with it, they *do*.... ;-)

And if we made it something like

   || (!strncmp (term, "rxvt", 4)) || (!strncmp (term, "Eterm", 5))

then C-PGDN/UP -- which currently don't work in Eterm -- *will* work
in Eterm. (And, in rxvt, aterm, wterm....)

They all define WINDOWID, yes indeed.... but, with the patch above, and
the WINDOWID-testing function I submitted yesterday, C-PGDN/UP will work
under _screen_ running in any of those terminals _too_.

I think there's a case to be made for that little function (which should
be renamed to is_capable_term() or something like that) and for today's
little patch, too. That's a lot of things working, that weren't working
before.

And no downside -- at least as far as my testing today has shown.

If there _is_ a terminal that defines WINDOWID and that's going to blow
up or something if the xterm_key_defines are added, I say we just add a
strncmp() test for it to is_capable_term()....

I haven't tested konsole (don't feel like dealing with all that KDE
cruft ;-) but then, konsole defines TERM=xterm, doesn't it? So there's
already something slipping through the net.

Now, as for an _infallible_ test -- This Really Is An Xterm, No
Fooling.... -- with the help of Usenet and manpages, I'm "this close" to
having a function, in spite of my ignorance of C and Xlib. I daresay I
can finish it.

But is it needed? -- that's the question.

...and AFAICT it wouldn't be available unless HAVE_TEXTMODE_X11_SUPPORT
were defined, unless one did a pretty big rewrite.

And, it probably ought to be somewhere else than in key.c / key.h if it
_were_ needed -- which it hasn't been so far.

I say, unless there's some downside I'm not aware of -- a downside that
can't be handled with a simple test -- that something like these
suggestions should be adopted; why *not* have this functionality
available in rxvt, aterm, wterm, Eterm, (etc.?)

(NTM screen-under-rxvt/aterm/wterm/Eterm.... and xterm too, of course!)

It seems eminently worth doing, and it only takes a half-dozen lines of
code.

That's how it looks to me.

best,

S.




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