-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest1.conf
177 lines (144 loc) · 3.29 KB
/
test1.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
//Automaticaly generated section
grab device "Jess Tech /Dual Analog Rumble Pad"
button BTN_TRIGGER = 288
button BTN_THUMB = 289
button BTN_THUMB2 = 290
button BTN_TOP = 291
button BTN_TOP2 = 292
button BTN_PINKIE = 293
button BTN_BASE = 294
button BTN_BASE2 = 295
button BTN_BASE3 = 296
button BTN_BASE4 = 297
button BTN_BASE5 = 298
button BTN_BASE6 = 299
axis ABS_X = 0
axis ABS_Y = 1
axis ABS_Z = 2
axis ABS_RZ = 5
axis ABS_HAT0X = 16
axis ABS_HAT0Y = 17
//Your configuration follows
if(BTN_BASE6){
new_axis ABS_Z
button BTN_TOP2
axis ABS_HAT0X
}
if(BTN_BASE5){
axis ABS_Z
}
axis ABS_HAT0X
// intentionaly wrong
// * send ABS_RW 14
// Test description
// Send axis event with no shifter active
//* send ABS_Z 14
//* receive axis 2 14
//* receive syn
//* send ABS_HAT0X 14
//* receive button 303 1
//* receive syn
// Shifter
//* send BTN_BASE6 1
// New axis - sent position of the source axis
//* receive button 300 1
//* receive syn
// Axis maped
//* send ABS_Z 5
//* receive axis 4 5
//* receive syn
// Check button mapping
//* send BTN_TOP2 1
//* receive button 302 1
//* receive syn
//* send BTN_TOP2 0
//* receive button 302 0
//* receive syn
// Remove shifter
//* send BTN_BASE6 0
// Send last source axis value to the original one
//* receive axis 2 5
//* receive syn
// The axis should now be mapped directly again
//* send ABS_Z 7
//* receive axis 2 7
//* receive syn
// Check mapping of axis to buttons
//* send BTN_BASE5 1
//* receive button 298 1
//* receive syn
// Going inactive
//* send ABS_Z 128
//* receive button 298 0
//* receive syn
// Going plus
//* send ABS_Z 222
//* receive button 299 1
//* receive syn
// Back to inactive
//* send ABS_Z 128
//* receive button 299 0
//* receive syn
// Going minus
//* send ABS_Z 4
//* receive button 298 1
//* receive syn
// Straight from minus to plus
//* send ABS_Z 222
//* receive button 298 0
//* receive button 299 1
//* receive syn
// Straight from plus to minus
//* send ABS_Z 4
//* receive button 299 0
//* receive button 298 1
//* receive syn
// Check passing unhandled event through
//* send BTN_TOP 1
//* receive button 291 1
//* receive syn
//* send BTN_TOP 0
//* receive button 291 0
//* receive syn
// Update axis when leaving condition
//* send BTN_BASE5 0
//* receive axis 2 222
//* receive syn
// Check condition crossings
//* send BTN_BASE6 1
// updated the mapped axis
//* receive axis 4 7
//* receive syn
// Check the mapped button update triggers update of button outside of cond
//* send BTN_TOP2 1
//* receive button 302 1
//* receive syn
//* send BTN_BASE6 0
//* receive button 292 1
//* receive syn
// Check the other way works too
//* send BTN_TOP2 0
//* receive button 292 0
//* receive syn
//* send BTN_BASE6 1
//* receive button 302 0
//* receive syn
// Do the same with axis mapped to buttons
//* send ABS_HAT0X 250
//* receive button 300 0
//* receive button 301 1
//* receive syn
//* send BTN_BASE6 0
//* receive button 303 0
//* receive button 304 1
//* receive syn
//* send BTN_BASE6 1
//* receive syn
//* send ABS_HAT0X 28
//* receive button 301 0
//* receive button 300 1
//* receive syn
//* send BTN_BASE6 0
//* receive button 304 0
//* receive button 303 1
//* receive syn