Package: xvt
Version: 2.1-20
Severity: wishlist
Tags: patch

The following patch will let Xvt react correctly to the key strokes

   * Home and End.
   * On VT100 keypad: Home, End, Del, and all arrow keys.

In addition, the keys Insert, PageUp, PageDown, also on the kaypad,
will produce correct ASCII sequences, but their expected functionality
must await further alterations of the relevant C-code.

Best regards,

Mats Erik Andersson, fil. dr, DM
Description: Implement correct ASCII key sequences.
 Some convenient special keys are not detectable
 due to missing key symbols, or due to incorrect
 ASCII decoding for present day VT220 terminals.
 These are corrected for Home, End, as well as
 all movements and Del present on the VT100 Keypad.
 .
 The keys Insert, PgUp, and PgDown are also given
 correct decoding, but the software does not give
 them the expected behaviour.
Author: Mats Erik Andersson <[email protected]>
Forwarded: no
Last-Update: 2010-12-01

--- xvt-2.1.debian/command.c
+++ xvt-2.1/command.c
@@ -196,12 +196,12 @@ static struct keymapst func_key_table[]
 	{XK_F34,	{KS_TYPE_NONE,0},	{KS_TYPE_SUN,221}},
 	{XK_F35,	{KS_TYPE_NONE,0},	{KS_TYPE_SUN,222}},
 	{XK_Find,	{KS_TYPE_XTERM,1},	{KS_TYPE_SUN,1}},
-	{XK_Insert,	{KS_TYPE_XTERM,2},	{KS_TYPE_SUN,2}},
+	{XK_Insert,	{KS_TYPE_VT220,2},	{KS_TYPE_SUN,2}},
 	{XK_Delete,	{KS_TYPE_VT220,3},	{KS_TYPE_SUN,3}},
 	{XK_BackSpace,	{KS_TYPE_CHAR,127},	{KS_TYPE_SUN,3}},
 	{XK_Select,	{KS_TYPE_XTERM,4},	{KS_TYPE_SUN,4}},
-	{XK_Prior,	{KS_TYPE_XTERM,5},	{KS_TYPE_SUN,5}},
-	{XK_Next,	{KS_TYPE_XTERM,6},	{KS_TYPE_SUN,6}},
+	{XK_Prior,	{KS_TYPE_VT220,5},	{KS_TYPE_SUN,5}},
+	{XK_Next,	{KS_TYPE_VT220,6},	{KS_TYPE_SUN,6}},
 	{XK_Help,	{KS_TYPE_XTERM,28},	{KS_TYPE_SUN,196}},
 	{XK_Menu,	{KS_TYPE_XTERM,29},	{KS_TYPE_SUN,197}},
 	{0,		{KS_TYPE_NONE,0},	{KS_TYPE_NONE,0}}
@@ -214,8 +214,8 @@ static struct keymapst other_key_table[]
 	{ XK_Down,	{KS_TYPE_NONAPP,'B'},	{KS_TYPE_APPKEY,'B'}},
 	{ XK_Right,	{KS_TYPE_NONAPP,'C'},	{KS_TYPE_APPKEY,'C'}},
 	{ XK_Left,	{KS_TYPE_NONAPP,'D'},	{KS_TYPE_APPKEY,'D'}},
-	{ XK_Home,	{KS_TYPE_NONAPP,'h'},	{KS_TYPE_APPKEY,'h'}},
-	{ XK_End,	{KS_TYPE_NONAPP,'\0'},	{KS_TYPE_APPKEY,'\0'}},
+	{ XK_Home,	{KS_TYPE_VT220,1},	{KS_TYPE_APPKEY,'h'}},
+	{ XK_End,	{KS_TYPE_VT220,4},	{KS_TYPE_APPKEY,'\0'}},
 	{ XK_KP_F1,	{KS_TYPE_APPKEY,'P'},	{KS_TYPE_APPKEY,'P'}},
 	{ XK_KP_F2,	{KS_TYPE_APPKEY,'Q'},	{KS_TYPE_APPKEY,'Q'}},
 	{ XK_KP_F3,	{KS_TYPE_APPKEY,'R'},	{KS_TYPE_APPKEY,'R'}},
@@ -245,6 +245,16 @@ static struct keymapst kp_key_table[]={
 	{ XK_KP_Enter,	{KS_TYPE_CHAR,'\r'},	{KS_TYPE_APPKEY,'M'}},
 	{ XK_KP_Space,	{KS_TYPE_CHAR,' '},	{KS_TYPE_APPKEY,' '}},
 	{ XK_KP_Tab,	{KS_TYPE_CHAR,'\t'},	{KS_TYPE_APPKEY,'I'}},
+	{ XK_KP_Insert,	{KS_TYPE_VT220,2},	{KS_TYPE_SUN,2}},
+	{ XK_KP_Delete,	{KS_TYPE_VT220,3},	{KS_TYPE_SUN,3}},
+	{ XK_KP_Up,	{KS_TYPE_NONAPP,'A'},	{KS_TYPE_APPKEY,'A'}},
+	{ XK_KP_Down,	{KS_TYPE_NONAPP,'B'},	{KS_TYPE_APPKEY,'B'}},
+	{ XK_KP_Right,	{KS_TYPE_NONAPP,'C'},	{KS_TYPE_APPKEY,'C'}},
+	{ XK_KP_Left,	{KS_TYPE_NONAPP,'D'},	{KS_TYPE_APPKEY,'D'}},
+	{ XK_KP_Home,	{KS_TYPE_VT220,1},	{KS_TYPE_APPKEY,'h'}},
+	{ XK_KP_End,	{KS_TYPE_VT220,4},	{KS_TYPE_APPKEY,'\0'}},
+	{ XK_KP_Prior,	{KS_TYPE_VT220,5},	{KS_TYPE_SUN,5}},
+	{ XK_KP_Next,	{KS_TYPE_VT220,6},	{KS_TYPE_SUN,6}},
 	{0,		{KS_TYPE_NONE,0},	{KS_TYPE_NONE,0}}
 };
 

Attachment: signature.asc
Description: Digital signature

Reply via email to