r12084 - in /desktop/unstable/vte/debian: changelog patches/61_ctrl-and-shift-arrows.patch patches/62_alt-arrows.patch

lool at users.alioth.debian.org lool at users.alioth.debian.org
Tue Jul 24 07:17:39 UTC 2007


Author: lool
Date: Tue Jul 24 07:17:39 2007
New Revision: 12084

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=12084
Log:
* New patches, 61_ctrl-and-shift-arrows and 62_alt-arrows, should fix
  handling of Ctrl-, Shift-, and Alt- + arrow keys by using xterm's
  sequences; GNOME #310305 and #337252; closes: #421734.
* 

Added:
    desktop/unstable/vte/debian/patches/61_ctrl-and-shift-arrows.patch
    desktop/unstable/vte/debian/patches/62_alt-arrows.patch
Modified:
    desktop/unstable/vte/debian/changelog

Modified: desktop/unstable/vte/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vte/debian/changelog?rev=12084&op=diff
==============================================================================
--- desktop/unstable/vte/debian/changelog (original)
+++ desktop/unstable/vte/debian/changelog Tue Jul 24 07:17:39 2007
@@ -1,10 +1,14 @@
-vte (1:0.16.6-2) UNRELEASED; urgency=low
+vte (1:0.16.6-2) unstable; urgency=low
 
   * Drop patch 41_from_upstream_fix_nvi_scrolling; fixed differently upstream
     since 0.16.2; see GNOME #417652.
   * Add xrefs to patches.
-
- -- Loic Minier <lool at dooz.org>  Thu, 21 Jun 2007 17:30:18 +0200
+  * New patches, 61_ctrl-and-shift-arrows and 62_alt-arrows, should fix
+    handling of Ctrl-, Shift-, and Alt- + arrow keys by using xterm's
+    sequences; GNOME #310305 and #337252; closes: #421734.
+  * 
+
+ -- Loic Minier <lool at dooz.org>  Tue, 24 Jul 2007 09:06:47 +0200
 
 vte (1:0.16.6-1) unstable; urgency=low
 

Added: desktop/unstable/vte/debian/patches/61_ctrl-and-shift-arrows.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vte/debian/patches/61_ctrl-and-shift-arrows.patch?rev=12084&op=file
==============================================================================
--- desktop/unstable/vte/debian/patches/61_ctrl-and-shift-arrows.patch (added)
+++ desktop/unstable/vte/debian/patches/61_ctrl-and-shift-arrows.patch Tue Jul 24 07:17:39 2007
@@ -1,0 +1,24 @@
+GNOME #310305; Debian #421734; use xterm sequences for Ctrl- and Shift- + arrow
+keys
+
+diff -Nur vte-0.16.6/src/keymap.c vte-0.16.6.new/src/keymap.c
+--- vte-0.16.6/src/keymap.c	2007-07-24 08:58:07.000000000 +0200
++++ vte-0.16.6.new/src/keymap.c	2007-07-24 08:58:52.000000000 +0200
+@@ -310,7 +310,7 @@
+ /* Keys affected by the cursor key mode. */
+ static const struct _vte_keymap_entry _vte_keymap_GDK_Up[] = {
+ 	{cursor_default, keypad_all, fkey_all, 0, X_NULL, 0, "ku"},
+-	{cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "A", -1, X_NULL},
++	{cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "1;A", -1, X_NULL},
+ 	{cursor_default, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "A", -1, X_NULL},
+ 	{cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "A", -1, X_NULL},
+ 	{cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+@@ -318,7 +318,7 @@
+ 
+ static const struct _vte_keymap_entry _vte_keymap_GDK_Down[] = {
+ 	{cursor_default, keypad_all, fkey_all, 0, X_NULL, 0, "kd"},
+-	{cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "B", -1, X_NULL},
++	{cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "1;B", -1, X_NULL},
+ 	{cursor_default, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "B", -1, X_NULL},
+ 	{cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "B", -1, X_NULL},
+ 	{cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},

Added: desktop/unstable/vte/debian/patches/62_alt-arrows.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vte/debian/patches/62_alt-arrows.patch?rev=12084&op=file
==============================================================================
--- desktop/unstable/vte/debian/patches/62_alt-arrows.patch (added)
+++ desktop/unstable/vte/debian/patches/62_alt-arrows.patch Tue Jul 24 07:17:39 2007
@@ -1,0 +1,94 @@
+GNOME #337252; Debian #421734; use xterm sequences for Alt- + arrow keys
+
+Index: src/keymap.c
+===================================================================
+--- src/keymap.c	(revision 1887)
++++ src/keymap.c	(working copy)
+@@ -1120,6 +1120,7 @@
+ 							  hp_mode,
+ 							  legacy_mode,
+ 							  vt220_mode,
++							  cursor_mode & cursor_app,
+ 							  normal,
+ 							  normal_length);
+ 			_VTE_DEBUG_IF(VTE_DEBUG_KEYBOARD) {
+@@ -1323,6 +1324,31 @@
+ 	return fkey;
+ }
+ 
++/* Prior and Next are ommitted for the SS3 to CSI switch below */
++gboolean
++is_cursor_key(guint keyval)
++{
++	switch (keyval) {
++	case GDK_Home:
++	case GDK_Left:
++	case GDK_Up:
++	case GDK_Right:
++	case GDK_Down:
++	case GDK_End:
++
++	case GDK_KP_Home:
++	case GDK_KP_Left:
++	case GDK_KP_Up:
++	case GDK_KP_Right:
++	case GDK_KP_Down:
++	case GDK_KP_End:
++		return TRUE;
++	default:
++		return FALSE;
++	}
++}
++
++
+ void
+ _vte_keymap_key_add_key_modifiers(guint keyval,
+ 				  GdkModifierType modifiers,
+@@ -1330,6 +1356,7 @@
+ 				  gboolean hp_mode,
+ 				  gboolean legacy_mode,
+ 				  gboolean vt220_mode,
++				  gboolean cursor_app_mode,
+ 				  char **normal,
+ 				  gssize *normal_length)
+ {
+@@ -1386,6 +1413,15 @@
+ 	nnormal = g_malloc0(*normal_length + 4);
+ 	memcpy(nnormal, *normal, *normal_length);
+ 	if (strlen(nnormal) > 1) {
++		/* SS3 should have no modifiers so make it CSI instead. See
++		 * http://cvsweb.xfree86.org/cvsweb/xc/programs/xterm/input.c.diff?r1=3.57&r2=3.58
++		 */
++		if (cursor_app_mode &&
++			g_str_has_prefix(nnormal, _VTE_CAP_SS3)
++			&& is_cursor_key(keyval)) {
++			nnormal[1] = '[';
++		}
++
+ 		/* Get the offset of the last character. */
+ 		offset = strlen(nnormal) - 1;
+ 		if (g_ascii_isdigit(nnormal[offset - 1])) {
+Index: src/keymap.h
+===================================================================
+--- src/keymap.h	(revision 1887)
++++ src/keymap.h	(working copy)
+@@ -56,6 +56,7 @@
+ 				       gboolean hp_mode,
+ 				       gboolean legacy_mode,
+ 				       gboolean vt220_mode,
++				       gboolean app_cursor_keys,
+ 				       char **normal,
+ 				       gssize *normal_length);
+ 
+Index: src/vte.c
+===================================================================
+--- src/vte.c	(revision 1887)
++++ src/vte.c	(working copy)
+@@ -4414,6 +4414,7 @@
+ 							  terminal->pvt->hp_fkey_mode,
+ 							  terminal->pvt->legacy_fkey_mode,
+ 							  terminal->pvt->vt220_fkey_mode,
++							  terminal->pvt->cursor_mode == VTE_KEYMODE_APPLICATION,
+ 							  &normal,
+ 							  &normal_length);
+ 			output = g_strdup_printf(normal, 1);




More information about the pkg-gnome-commits mailing list