On Tue, Dec 29, 2015 at 10:02:48PM +0100, Mark Kettenis wrote: > > From: "Ted Unangst" <t...@tedunangst.com> > > Date: Tue, 29 Dec 2015 12:11:25 -0500 > > > > In tmux, home and end send different bytes. I don't know why, but I want > > things to just work. We already have two different keys here, so what's one > > more? (how many can there be...?) > > Isn't that somehowa tmux bug? I mean, isn't tmux supposed to be > compatible with some standard terminal type?
Looking at the tmux and screen terminfo definitions for khome and kend, it looks like tmux is doing exactly what it is supposed to be doing. Shouldn't the program be checking the termcap/terminfo definition for $TERM and interpreting the control sequences appropriately? In this case, it looks like the program is just hardcoding the SS3 H/F sequences, which will work for a bunch of terminals, but not all. > > > Index: emacs.c > > =================================================================== > > RCS file: /cvs/src/bin/ksh/emacs.c,v > > retrieving revision 1.62 > > diff -u -p -r1.62 emacs.c > > --- emacs.c 14 Dec 2015 13:59:42 -0000 1.62 > > +++ emacs.c 29 Dec 2015 10:41:45 -0000 > > @@ -1576,6 +1576,8 @@ x_init_emacs(void) > > kb_add(x_mv_end, NULL, CTRL('['), '[', 'F', 0); /* end */ > > kb_add(x_mv_begin, NULL, CTRL('['), 'O', 'H', 0); /* home > > */ > > kb_add(x_mv_end, NULL, CTRL('['), 'O', 'F', 0); /* end */ > > + kb_add(x_mv_begin, NULL, CTRL('['), '[', '1', '~', 0); /* > > home */ > > + kb_add(x_mv_end, NULL, CTRL('['), '[', '4', '~', 0); /* > > end */ > > > > /* can't be bound */ > > kb_add(x_set_arg, NULL, CTRL('['), '0', 0); > > > > >