… | |
… | |
299 | rxvt_term::lookup_key (XKeyEvent &ev) |
299 | rxvt_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) |
… | |
… | |
3292 | ndef = get_byte_array_bit (csi_defaults, i); |
3279 | ndef = get_byte_array_bit (csi_defaults, i); |
3293 | for (p = 0; p < nargs; p++) |
3280 | for (p = 0; p < nargs; p++) |
3294 | if (arg[p] == -1) |
3281 | if (arg[p] == -1) |
3295 | arg[p] = ndef; |
3282 | arg[p] = ndef; |
3296 | |
3283 | |
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 | /* |
3284 | /* |
3305 | * private mode handling |
3285 | * private mode handling |
3306 | */ |
3286 | */ |
3307 | if (priv) |
3287 | if (priv) |
3308 | { |
3288 | { |