1 |
/* |
2 |
* command.h |
3 |
*/ |
4 |
|
5 |
#ifndef COMMAND_H_ |
6 |
#define COMMAND_H_ |
7 |
|
8 |
// STRING_MAX __MUST__ not be larger than what CBUFSIZ can hold. |
9 |
#define STRING_MAX 2048 /* max string size for process_rxvt_xterm_seq() */ |
10 |
|
11 |
#define ESC_ARGS 32 /* max # of args for esc sequences */ |
12 |
|
13 |
#ifndef MULTICLICK_TIME |
14 |
# define MULTICLICK_TIME 500 |
15 |
#endif |
16 |
#ifndef SCROLLBAR_INITIAL_DELAY |
17 |
# define SCROLLBAR_INITIAL_DELAY 0.33 |
18 |
#endif |
19 |
#ifndef SCROLLBAR_CONTINUOUS_DELAY |
20 |
# define SCROLLBAR_CONTINUOUS_DELAY 0.05 |
21 |
#endif |
22 |
|
23 |
/* |
24 |
* key-strings: if only these keys were standardized <sigh> |
25 |
*/ |
26 |
#ifdef LINUX_KEYS |
27 |
# define KS_HOME "\033[1~" /* Home == Find */ |
28 |
# define KS_END "\033[4~" /* End == Select */ |
29 |
#else |
30 |
# define KS_HOME "\033[7~" /* Home */ |
31 |
# define KS_END "\033[8~" /* End */ |
32 |
#endif |
33 |
|
34 |
#ifdef SCROLL_ON_SHIFT |
35 |
# define SCROLL_SHIFTKEY (shft) |
36 |
# define NOSCROLL_SHIFTKEY 0 |
37 |
#else |
38 |
# define SCROLL_SHIFTKEY 0 |
39 |
# define NOSCROLL_SHIFTKEY (shft) |
40 |
#endif |
41 |
#ifdef SCROLL_ON_CTRL |
42 |
# define SCROLL_CTRLKEY (ctrl) |
43 |
# define NOSCROLL_CTRLKEY 0 |
44 |
#else |
45 |
# define SCROLL_CTRLKEY 0 |
46 |
# define NOSCROLL_CTRLKEY (ctrl) |
47 |
#endif |
48 |
#ifdef SCROLL_ON_META |
49 |
# define SCROLL_METAKEY (meta) |
50 |
# define NOSCROLL_METAKEY 0 |
51 |
#else |
52 |
# define SCROLL_METAKEY 0 |
53 |
# define NOSCROLL_METAKEY (meta) |
54 |
#endif |
55 |
#define IS_SCROLL_MOD ((SCROLL_SHIFTKEY || SCROLL_CTRLKEY || SCROLL_METAKEY) \ |
56 |
&& (!NOSCROLL_SHIFTKEY && !NOSCROLL_CTRLKEY && !NOSCROLL_METAKEY)) |
57 |
|
58 |
|
59 |
/* |
60 |
* ESC-Z processing: |
61 |
* |
62 |
* By stealing a sequence to which other xterms respond, and sending the |
63 |
* same number of characters, but having a distinguishable sequence, |
64 |
* we can avoid having a timeout (when not under an rxvt) for every login |
65 |
* shell to auto-set its DISPLAY. |
66 |
* |
67 |
* This particular sequence is even explicitly stated as obsolete since |
68 |
* about 1985, so only very old software is likely to be confused, a |
69 |
* confusion which can likely be remedied through termcap or TERM. Frankly, |
70 |
* I doubt anyone will even notice. We provide a #ifdef just in case they |
71 |
* don't care about auto-display setting. Just in case the ancient |
72 |
* software in question is broken enough to be case insensitive to the 'c' |
73 |
* character in the answerback string, we make the distinguishing |
74 |
* characteristic be capitalization of that character. The length of the |
75 |
* two strings should be the same so that identical read (2) calls may be |
76 |
* used. |
77 |
*/ |
78 |
#define VT100_ANS "\033[?1;2c" /* vt100 answerback */ |
79 |
#ifndef ESCZ_ANSWER |
80 |
# define ESCZ_ANSWER VT100_ANS /* obsolete ANSI ESC[c */ |
81 |
#endif |
82 |
|
83 |
#endif /* _COMMAND_H_ */ |