ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.281 by root, Tue Jan 24 17:28:06 2006 UTC vs.
Revision 1.284 by root, Wed Jan 25 02:42:06 2006 UTC

299rxvt_term::lookup_key (XKeyEvent &ev) 299rxvt_term::lookup_key (XKeyEvent &ev)
300{ 300{
301 int ctrl, meta, shft, len; 301 int ctrl, meta, shft, len;
302 unsigned int newlen; 302 unsigned int newlen;
303 KeySym keysym; 303 KeySym keysym;
304#ifdef DEBUG_CMD
305 static int debug_key = 1; /* accessible by a debugger only */
306#endif
307 int valid_keysym; 304 int valid_keysym;
308 char kbuf[KBUFSZ]; 305 char kbuf[KBUFSZ];
309 306
310 /* 307 /*
311 * use Num_Lock to toggle Keypad on/off. If Num_Lock is off, allow an 308 * use Num_Lock to toggle Keypad on/off. If Num_Lock is off, allow an
902 { 899 {
903 const char ch = C0_ESC; 900 const char ch = C0_ESC;
904 tt_write (&ch, 1); 901 tt_write (&ch, 1);
905 } 902 }
906 903
907#if defined(DEBUG_CMD)
908 /* Display keyboard buffer contents */
909 unsigned char *p;
910 int i;
911
912 fprintf (stderr, "key 0x%04X [%d]: `", (unsigned int)keysym, len);
913 for (i = 0, p = kbuf; i < len; i++, p++)
914 fprintf (stderr, (*p >= ' ' && *p < '\177' ? "%c" : "\\%03o"), *p);
915 fprintf (stderr, "'\n");
916#endif /* DEBUG_CMD */
917 tt_write (kbuf, (unsigned int)len); 904 tt_write (kbuf, (unsigned int)len);
918} 905}
919/*}}} */ 906/*}}} */
920 907
921#if defined (KEYSYM_RESOURCE) 908#if defined (KEYSYM_RESOURCE)
1278 tt_printf ("\033[M%c%c%c", 1265 tt_printf ("\033[M%c%c%c",
1279 (32 + button_number + key_state), 1266 (32 + button_number + key_state),
1280 (32 + x + 1), 1267 (32 + x + 1),
1281 (32 + y + 1)); 1268 (32 + y + 1));
1282} 1269}
1283
1284#ifdef USING_W11LIB
1285void
1286rxvt_W11_process_x_event (XEvent *ev)
1287{
1288 rxvt_t *r = rxvt_get_r ();
1289
1290 x_cb (*ev);
1291}
1292#endif
1293 1270
1294/*{{{ process an X event */ 1271/*{{{ process an X event */
1295void 1272void
1296rxvt_term::x_cb (XEvent &ev) 1273rxvt_term::x_cb (XEvent &ev)
1297{ 1274{
3292 ndef = get_byte_array_bit (csi_defaults, i); 3269 ndef = get_byte_array_bit (csi_defaults, i);
3293 for (p = 0; p < nargs; p++) 3270 for (p = 0; p < nargs; p++)
3294 if (arg[p] == -1) 3271 if (arg[p] == -1)
3295 arg[p] = ndef; 3272 arg[p] = ndef;
3296 3273
3297#ifdef DEBUG_CMD
3298 fprintf (stderr, "CSI ");
3299 for (p = 0; p < nargs; p++)
3300 fprintf (stderr, "%d%s", arg[p], p < nargs - 1 ? ";" : "");
3301 fprintf (stderr, "%c\n", ch);
3302#endif
3303
3304 /* 3274 /*
3305 * private mode handling 3275 * private mode handling
3306 */ 3276 */
3307 if (priv) 3277 if (priv)
3308 { 3278 {
3309 switch (priv) 3279 switch (priv)
3310 { 3280 {
3311 case '>': 3281 case '>':
3312 if (ch == CSI_DA) /* secondary device attributes */ 3282 if (ch == CSI_DA) /* secondary device attributes */
3283 {
3284 // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt,
3285 // 'U' for rxvt-unicode <= 7.2, and Mm85 (e.g. 7385 for 7.3) for later versions.
3286 //
3287 // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt
3288 // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify
3289 // that we do not support xterm mouse reporting (should be 95 when we do).
3290 //
3313 tt_printf ("\033[>%d;%c%c;0c", 'U', VERSION[0], VERSION[2]); 3291 tt_printf ("\033[>%c%c85;94;0c", VERSION[0], VERSION[1]);
3292 }
3314 break; 3293 break;
3315 case '?': 3294 case '?':
3316 if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') 3295 if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't')
3317 process_terminal_mode (ch, priv, nargs, arg); 3296 process_terminal_mode (ch, priv, nargs, arg);
3318 break; 3297 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines