Bug#563828: #563828 finch: GNT shortcuts do not work in Xterm

2010-01-17 Thread Ari Pollak
Thomas Dickey wrote:
 ...as an example, looking at this chunk in gntkeys.c, almost all of
 it is incorrect:

What's incorrect about it, other than not using terminfo?



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#563828: #563828 finch: GNT shortcuts do not work in Xterm

2010-01-17 Thread Thomas Dickey

On Sun, 17 Jan 2010, Ari Pollak wrote:


Thomas Dickey wrote:

...as an example, looking at this chunk in gntkeys.c, almost all of
it is incorrect:


What's incorrect about it, other than not using terminfo?


It makes assumptions about the corresponding terminal descriptions which
don't match any of the ones that I've constructed for ncurses.  You might
want to use infocmp on each of those names, and look at the results.

For instance, this line might make sense if gnt_key_cup stands for
control-cursor-up:

gnt_key_cup= \033 [1;5A;

However, xterm and rxvt don't send the same control sequences for 
control-cursor-keys.  rxvt and rxvt-unicode send the same, since
almost all of the latter's terminal-behavior (such as this) is from the 
former.


screen and rxvt-unicode also differ - screen passes through many of the 
control sequences which it doesn't know about.  It's possible that the 
developer only tested screen with that particular terminal.  In this case, 
a screen.rxvt-unicode entry would be needed to make things work properly 
- see the other screen.XXX entries that I made to see how it works.


The controls[] and alts[] lists - the latter ignores shift, which is more
common than meta (which still isn't the same as alt).

(the check for null pointer was also redundant, from a quick read of the 
code ;-)


For the rest, I'd have to pull out the file again (comments here are just 
the obvious stuff that I noticed last week).


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#563828: #563828 finch: GNT shortcuts do not work in Xterm

2010-01-09 Thread Thomas Dickey
...as an example, looking at this chunk in gntkeys.c, almost all of
it is incorrect:

void gnt_init_keys()
{
const char *controls[] = {, c-, ctrl-, ctr-, ctl-, NULL};
const char *alts[] = {, alt-, a-, m-, meta-, NULL};
int c, a, ch;
char key[32];

if (term == NULL) {
term = getenv(TERM);
if (!term)
term = ;  /* Just in case */
}

if (strstr(term, xterm) == term || strcmp(term, rxvt) == 0) {
gnt_key_cup= \033 [1;5A;
gnt_key_cdown  = \033 [1;5B;
gnt_key_cright = \033 [1;5C;
gnt_key_cleft  = \033 [1;5D;
} else if (strstr(term, screen) == term || strcmp(term, rxvt-unicode) =
gnt_key_cup= \033 Oa;
gnt_key_cdown  = \033 Ob;
gnt_key_cright = \033 Oc;
gnt_key_cleft  = \033 Od;
}

(there's more, of course)

-- 
Thomas E. Dickey dic...@invisible-island.net
http://invisible-island.net
ftp://invisible-island.net


signature.asc
Description: Digital signature


Bug#563828: #563828 finch: GNT shortcuts do not work in Xterm

2010-01-09 Thread Thomas Dickey
finch has a lot of hardcoded stuff rather than using the terminal
description - gntkeys.c for instance.  That's compounded with
konsole setting $TERM to xterm, of course.

If the hardcoding in finch were cleared up, then this would be just
a konsole bug.

-- 
Thomas E. Dickey dic...@invisible-island.net
http://invisible-island.net
ftp://invisible-island.net


signature.asc
Description: Digital signature