line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Term::Choose::Constants; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
20
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
94
|
|
4
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
17
|
|
|
3
|
|
|
|
|
56
|
|
5
|
3
|
|
|
3
|
|
27
|
use 5.10.0; |
|
3
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.762'; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
28
|
use Exporter qw( import ); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
416
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
12
|
|
|
|
|
|
|
NEXT_get_key |
13
|
|
|
|
|
|
|
CONTROL_SPACE LINE_FEED CARRIAGE_RETURN |
14
|
|
|
|
|
|
|
CONTROL_A CONTROL_B CONTROL_C CONTROL_D CONTROL_E CONTROL_F CONTROL_H CONTROL_I |
15
|
|
|
|
|
|
|
CONTROL_K CONTROL_N CONTROL_P CONTROL_Q CONTROL_R CONTROL_S CONTROL_T CONTROL_U CONTROL_X |
16
|
|
|
|
|
|
|
KEY_BTAB KEY_TAB KEY_ESC KEY_SPACE KEY_h KEY_j KEY_k KEY_l KEY_q KEY_Tilde KEY_BSPACE |
17
|
|
|
|
|
|
|
VK_LEFT VK_RIGHT VK_UP VK_DOWN |
18
|
|
|
|
|
|
|
VK_INSERT VK_DELETE VK_HOME VK_END VK_PAGE_UP VK_PAGE_DOWN |
19
|
|
|
|
|
|
|
VK_F1 VK_F2 VK_F3 VK_F4 |
20
|
|
|
|
|
|
|
ROW COL |
21
|
|
|
|
|
|
|
WIDTH_CURSOR TERM_READKEY |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
25
|
|
|
|
|
|
|
all => [ @EXPORT_OK ] |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
3
|
|
19
|
use constant TERM_READKEY => eval { require Term::ReadKey; 1 }; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
21
|
|
|
3
|
|
|
|
|
771
|
|
|
0
|
|
|
|
|
0
|
|
30
|
|
|
|
|
|
|
|
31
|
3
|
|
|
3
|
|
18
|
use constant WIDTH_CURSOR => 1; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
199
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use constant { |
34
|
3
|
|
|
|
|
437
|
ROW => 0, |
35
|
|
|
|
|
|
|
COL => 1, |
36
|
3
|
|
|
3
|
|
17
|
}; |
|
3
|
|
|
|
|
23
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use constant { |
39
|
3
|
|
|
|
|
1127
|
NEXT_get_key => -1, |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
CONTROL_SPACE => 0x00, |
42
|
|
|
|
|
|
|
CONTROL_A => 0x01, |
43
|
|
|
|
|
|
|
CONTROL_B => 0x02, |
44
|
|
|
|
|
|
|
CONTROL_C => 0x03, |
45
|
|
|
|
|
|
|
CONTROL_D => 0x04, |
46
|
|
|
|
|
|
|
CONTROL_E => 0x05, |
47
|
|
|
|
|
|
|
CONTROL_F => 0x06, |
48
|
|
|
|
|
|
|
# CONTROL_G => 0x07, |
49
|
|
|
|
|
|
|
CONTROL_H => 0x08, |
50
|
|
|
|
|
|
|
KEY_BTAB => 0x08, |
51
|
|
|
|
|
|
|
CONTROL_I => 0x09, |
52
|
|
|
|
|
|
|
KEY_TAB => 0x09, |
53
|
|
|
|
|
|
|
# CONTROL_J => 0x0a, |
54
|
|
|
|
|
|
|
LINE_FEED => 0x0a, |
55
|
|
|
|
|
|
|
CONTROL_K => 0x0b, |
56
|
|
|
|
|
|
|
# CONTROL_L => 0x0c, |
57
|
|
|
|
|
|
|
# CONTROL_M => 0x0d, |
58
|
|
|
|
|
|
|
CARRIAGE_RETURN => 0x0d, |
59
|
|
|
|
|
|
|
CONTROL_N => 0x0e, |
60
|
|
|
|
|
|
|
# CONTROL_O => 0x0f, |
61
|
|
|
|
|
|
|
CONTROL_P => 0x10, |
62
|
|
|
|
|
|
|
CONTROL_Q => 0x11, |
63
|
|
|
|
|
|
|
CONTROL_R => 0x12, # unused |
64
|
|
|
|
|
|
|
CONTROL_S => 0x13, |
65
|
|
|
|
|
|
|
CONTROL_T => 0x14, |
66
|
|
|
|
|
|
|
CONTROL_U => 0x15, |
67
|
|
|
|
|
|
|
# CONTROL_V => 0x16, |
68
|
|
|
|
|
|
|
# CONTROL_W => 0x17, |
69
|
|
|
|
|
|
|
CONTROL_X => 0x18, |
70
|
|
|
|
|
|
|
# CONTROL_Y => 0x19, |
71
|
|
|
|
|
|
|
# CONTROL_Z => 0x1a, |
72
|
|
|
|
|
|
|
KEY_ESC => 0x1b, |
73
|
|
|
|
|
|
|
KEY_SPACE => 0x20, |
74
|
|
|
|
|
|
|
KEY_h => 0x68, |
75
|
|
|
|
|
|
|
KEY_j => 0x6a, |
76
|
|
|
|
|
|
|
KEY_k => 0x6b, |
77
|
|
|
|
|
|
|
KEY_l => 0x6c, |
78
|
|
|
|
|
|
|
KEY_q => 0x71, |
79
|
|
|
|
|
|
|
KEY_Tilde => 0x7e, |
80
|
|
|
|
|
|
|
KEY_BSPACE => 0x7f, |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
VK_PAGE_UP => 333, # VK_CODE_KEY + 300 |
83
|
|
|
|
|
|
|
VK_PAGE_DOWN => 334, |
84
|
|
|
|
|
|
|
VK_END => 335, |
85
|
|
|
|
|
|
|
VK_HOME => 336, |
86
|
|
|
|
|
|
|
VK_LEFT => 337, |
87
|
|
|
|
|
|
|
VK_UP => 338, |
88
|
|
|
|
|
|
|
VK_RIGHT => 339, |
89
|
|
|
|
|
|
|
VK_DOWN => 340, |
90
|
|
|
|
|
|
|
VK_INSERT => 345, |
91
|
|
|
|
|
|
|
VK_DELETE => 346, |
92
|
|
|
|
|
|
|
VK_F1 => 412, |
93
|
|
|
|
|
|
|
VK_F2 => 413, |
94
|
|
|
|
|
|
|
VK_F3 => 414, |
95
|
|
|
|
|
|
|
VK_F4 => 415, |
96
|
3
|
|
|
3
|
|
19
|
}; |
|
3
|
|
|
|
|
5
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
1; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
__END__ |