--- charset.c	2006-05-08 01:00:43.941375000 -0600
+++ charset.c.new	2006-05-08 01:02:19.753875000 -0600
@@ -328,6 +328,7 @@
 {
     char_u	*res;
     char_u	*p;
+    int		res_added = 0;
 #ifdef FEAT_MBYTE
     int		l, len, c;
     char_u	hexbuf[11];
@@ -386,7 +387,40 @@
 	    }
 	    else
 #endif
-		STRCAT(res, transchar_byte(*p++));
+	    {
+		if ( *p == K_SPECIAL )
+		{
+		    union {
+			char_u  str[3];
+			int	c;
+		    } key;
+		    char_u *key_name;
+		    int modifiers = 0;
+
+		    key.c = TERMCAP2KEY( *(p+1), *(p+2) );
+
+		    extract_modifiers( key.c, &modifiers );
+		    key_name = get_special_key_name( key.c, modifiers);
+
+		    if ( STRCMP( key_name, "<>" ) && STRCMP( key_name, "" ) 
+			    && STRCMP( key_name, "<\\200>") )
+		    {
+			char_u res1;
+
+			p += 3;
+			res_added += STRLEN( key_name );
+			// vim_realloc does a free()
+			res = realloc( res, 
+				(unsigned)(vim_strsize(s) + 1) + res_added );
+			STRCAT( res, key_name );
+		    }
+		    else
+			STRCAT(res, transchar_byte(*p++));
+
+		}
+		else
+		    STRCAT(res, transchar_byte(*p++));
+	    }
 	}
     }
     return res;

