summaryrefslogtreecommitdiff
blob: b211dd7812480f2fe958a47eb117ff0d34e4e649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ripped from Debian's readline5_5.0-10.diff

# DP: Handle Debian Backspace/Delete keyboard policy

http://bugs.gentoo.org/74807

--- readline5-5.0~alpha.orig/terminal.c	2003-09-18 17:03:42.000000000 +0200
+++ readline5-5.0~alpha/terminal.c	2003-09-27 17:15:30.000000000 +0200
@@ -148,6 +148,9 @@
 /* Insert key */
 static char *_rl_term_kI;
 
+/* The key sequence sent by the Delete key, if any. */
+static char *_rl_term_kD;
+
 /* Cursor control */
 static char *_rl_term_vs;	/* very visible */
 static char *_rl_term_ve;	/* normal */
@@ -314,6 +317,7 @@
   { "ic", &_rl_term_ic },
   { "im", &_rl_term_im },
   { "kH", &_rl_term_kH },	/* home down ?? */
+  { "kD", &_rl_term_kD },	/* delete */
   { "kI", &_rl_term_kI },	/* insert */
   { "kd", &_rl_term_kd },
   { "ke", &_rl_term_ke },	/* end keypad mode */
@@ -492,6 +496,7 @@
 
   rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line);	/* Home */
   rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line);	/* End */
+  rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete);		/* Delete */
 
   _rl_keymap = xkeymap;
 }