1 |
pcg |
1.1 |
/* |
2 |
root |
1.15 |
* command.h |
3 |
pcg |
1.1 |
*/ |
4 |
|
|
|
5 |
pcg |
1.5 |
#ifndef COMMAND_H_ |
6 |
|
|
#define COMMAND_H_ |
7 |
pcg |
1.1 |
|
8 |
pcg |
1.8 |
// STRING_MAX __MUST__ not be larger than what CBUFSIZ can hold. |
9 |
root |
1.10 |
#define STRING_MAX 2048 /* max string size for process_rxvt_xterm_seq() */ |
10 |
pcg |
1.8 |
|
11 |
pcg |
1.1 |
#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 |
root |
1.10 |
# define SCROLLBAR_INITIAL_DELAY 0.33 |
18 |
pcg |
1.1 |
#endif |
19 |
|
|
#ifndef SCROLLBAR_CONTINUOUS_DELAY |
20 |
root |
1.10 |
# define SCROLLBAR_CONTINUOUS_DELAY 0.05 |
21 |
pcg |
1.1 |
#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 |
root |
1.13 |
# define NOSCROLL_SHIFTKEY 0 |
37 |
pcg |
1.1 |
#else |
38 |
|
|
# define SCROLL_SHIFTKEY 0 |
39 |
root |
1.13 |
# define NOSCROLL_SHIFTKEY (shft) |
40 |
pcg |
1.1 |
#endif |
41 |
|
|
#ifdef SCROLL_ON_CTRL |
42 |
|
|
# define SCROLL_CTRLKEY (ctrl) |
43 |
root |
1.13 |
# define NOSCROLL_CTRLKEY 0 |
44 |
pcg |
1.1 |
#else |
45 |
|
|
# define SCROLL_CTRLKEY 0 |
46 |
root |
1.13 |
# define NOSCROLL_CTRLKEY (ctrl) |
47 |
pcg |
1.1 |
#endif |
48 |
|
|
#ifdef SCROLL_ON_META |
49 |
|
|
# define SCROLL_METAKEY (meta) |
50 |
root |
1.13 |
# define NOSCROLL_METAKEY 0 |
51 |
pcg |
1.1 |
#else |
52 |
|
|
# define SCROLL_METAKEY 0 |
53 |
root |
1.13 |
# define NOSCROLL_METAKEY (meta) |
54 |
pcg |
1.1 |
#endif |
55 |
root |
1.13 |
#define IS_SCROLL_MOD ((SCROLL_SHIFTKEY || SCROLL_CTRLKEY || SCROLL_METAKEY) \ |
56 |
|
|
&& (!NOSCROLL_SHIFTKEY && !NOSCROLL_CTRLKEY && !NOSCROLL_METAKEY)) |
57 |
|
|
|
58 |
pcg |
1.1 |
|
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 |
pcg |
1.6 |
* two strings should be the same so that identical read (2) calls may be |
76 |
pcg |
1.1 |
* 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 |
ayin |
1.19 |
#endif /* _COMMAND_H_ */ |