Josip Rodin <[EMAIL PROTECTED]> writes:

> Home and End did work prior to version 3.12 (that was 3.7 and 3.9 I guess),
> and Delete should do the same as Backspace, at least according to the help
> messages. I don't think Insert was ever bind to any action, I just mentioned
> it for completeness.

What terminal emulator are you using?  Backspace works just
fine in xterm.  I usually use krxvt and there Backspace
doesn't work.

> I'll repeat myself - if anyone wishes to fix this, and needs an account on a
> machine exhibiting the problem, just tell me. I'd try to fix it myself,
> but I'm not good enough programmer.

Fortunately, I'm using Debian potato and see the same
problem.  I'm sure those problem is not distribution
dependent, though. Following patch adds checks for Home, End
and Delete which is kh, @7 and kD respectively.
(Sorry, I'm just a user wrt Debian GNU/Linux.)

Now, the problem is, I don't know which functions should be
assigned to those keys.  How did Home and End work in
texinfo-3.9?

1999-12-17  Yoshiki Hayashi  <[EMAIL PROTECTED]>

        * info/terminal.h, info/terminal.c (term_kh, term_ke, term_kD):
        New variables to hold Home, End, Delete key sequences.
        * info/infomap.c (initialize_emacs_like_keymaps,
        initialize_vi_like_keymaps): Set them.

diff -cr texinfo-4.0.orig/info/infomap.c texinfo-4.0/info/infomap.c
*** texinfo-4.0.orig/info/infomap.c     Sat Jun 26 06:57:40 1999
--- texinfo-4.0/info/infomap.c  Thu Dec 16 23:30:25 1999
***************
*** 253,258 ****
--- 253,261 ----
    keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
    keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
    keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
+   keymap_bind_keyseq (map, term_kh, &map[Control ('a')]); /* home */
+   keymap_bind_keyseq (map, term_ke, &map[Control ('e')]); /* end */
  
    map = (Keymap)echo_area_keymap[ESC].function;
    keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
***************
*** 261,266 ****
--- 264,273 ----
    keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
    keymap_bind_keyseq (map, "\033OB", &map['f']);
    keymap_bind_keyseq (map, "\033[B", &map['f']);
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
+ 
+   map = (Keymap)echo_area_keymap[Control ('x')].function;
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
  
    /* Bind commands for Info window keymaps. */
    map = info_keymap;
***************
*** 368,373 ****
--- 375,383 ----
    keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
    keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
    keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
+   keymap_bind_keyseq (map, term_kh, &map['b']);       /* home */
+   keymap_bind_keyseq (map, term_ke, &map['e']);       /* end */
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
  
    map = (Keymap)info_keymap[ESC].function;
    keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
***************
*** 378,383 ****
--- 388,394 ----
    keymap_bind_keyseq (map, "\033[B", &map['f']);
    keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
    keymap_bind_keyseq (map, term_kP, &map[DEL]); /* pageup */
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
  
    /* The alternative to this definition of a `main map' key in the
       `ESC map' section, is something like:
***************
*** 497,502 ****
--- 508,516 ----
    keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
    keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
    keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
+   keymap_bind_keyseq (map, term_kh, &map[Control ('a')]); /* home */
+   keymap_bind_keyseq (map, term_ke, &map[Control ('e')]); /* end */
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
  
    map = (Keymap)echo_area_keymap[ESC].function;
    keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
***************
*** 505,510 ****
--- 519,528 ----
    keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
    keymap_bind_keyseq (map, "\033OB", &map['f']);
    keymap_bind_keyseq (map, "\033[B", &map['f']);
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
+ 
+   map = (Keymap)echo_area_keymap[Control ('x')].function;
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);
  
    /* Bind commands for Info window keymaps. */
    map = info_keymap;
***************
*** 574,579 ****
--- 592,598 ----
    map['z'].function = info_scroll_forward_set_window;
    map['Z'].function = NULL;   /* unbind, so it works to bind "ZZ" below */
    map[DEL].function = info_scroll_backward;
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);
    keymap_bind_keyseq (map, ":q", &map['q']);
    keymap_bind_keyseq (map, ":Q", &map['q']);
    keymap_bind_keyseq (map, "ZZ", &map['q']);
***************
*** 652,657 ****
--- 671,678 ----
    keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
    keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
    keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
+   keymap_bind_keyseq (map, term_kh, &map['b']);       /* home */
+   keymap_bind_keyseq (map, term_ke, &map['e']);       /* end */
  
    map = (Keymap)info_keymap[ESC].function;
    keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
***************
*** 662,667 ****
--- 683,689 ----
    keymap_bind_keyseq (map, "\033[B", &map['f']);
    keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
    keymap_bind_keyseq (map, term_kP, &map[DEL]); /* pageup */
+   keymap_bind_keyseq (map, term_kD, &map[DEL]);       /* delete */
  
    /* The alternative to this definition of a `main map' key in the
       `ESC map' section, is something like:
diff -cr texinfo-4.0.orig/info/terminal.c texinfo-4.0/info/terminal.c
*** texinfo-4.0.orig/info/terminal.c    Mon Sep 20 21:28:54 1999
--- texinfo-4.0/info/terminal.c Thu Dec 16 23:17:29 1999
***************
*** 223,228 ****
--- 223,231 ----
  char *term_kl = (char *)NULL;
  char *term_kP = (char *)NULL;   /* page-up */
  char *term_kN = (char *)NULL;   /* page-down */
+ char *term_kh = (char *)NULL; /* home */
+ char *term_ke = (char *)NULL; /* end */
+ char *term_kD = (char *)NULL; /* delete */
  
  /* Move the cursor to the terminal location of X and Y. */
  void
***************
*** 555,560 ****
--- 558,565 ----
        term_up = term_dn = audible_bell = visible_bell = NULL;
        term_ku = term_kd = term_kl = term_kr = NULL;
        term_kP = term_kN = NULL;
+       term_kh = term_ke = NULL;
+       term_kD = NULL;
        return;
      }
  
***************
*** 642,647 ****
--- 647,658 ----
  
    term_kP = tgetstr ("kP", &buffer);
    term_kN = tgetstr ("kN", &buffer);
+ 
+   /* Home and end keys. */
+   term_kh = tgetstr ("kh", &buffer);
+   term_ke = tgetstr ("@7", &buffer);
+ 
+   term_kD = tgetstr ("kD", &buffer);
  
    /* If this terminal is not cursor addressable, then it is really dumb. */
    if (!term_goto)
diff -cr texinfo-4.0.orig/info/terminal.h texinfo-4.0/info/terminal.h
*** texinfo-4.0.orig/info/terminal.h    Sat Jun 26 06:51:16 1999
--- texinfo-4.0/info/terminal.h Thu Dec 16 23:15:47 1999
***************
*** 121,125 ****
--- 121,127 ----
  /* The key sequences output by the arrow keys, if this terminal has any. */
  extern char *term_ku, *term_kd, *term_kr, *term_kl;
  extern char *term_kP, *term_kN;
+ extern char *term_kh, *term_ke;
+ extern char *term_kD;
  
  #endif /* !TERMINAL_H */

-- 
Yoshiki Hayashi

Reply via email to