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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
/*
* Copyright © 2015 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include "config.h"
#include "litest.h"
#include "litest-int.h"
static void litest_mouse_roccat_setup(void)
{
struct litest_device *d = litest_create_device(LITEST_MOUSE_ROCCAT);
litest_set_current_device(d);
}
static struct input_id input_id = {
.bustype = 0x3,
.vendor = 0x1e7d,
.product = 0x2e22,
};
static int events[] = {
EV_REL, REL_X,
EV_REL, REL_Y,
EV_REL, REL_WHEEL,
EV_REL, REL_HWHEEL,
EV_REL, REL_DIAL,
EV_KEY, KEY_ESC,
EV_KEY, KEY_ENTER,
EV_KEY, KEY_KPMINUS,
EV_KEY, KEY_KPPLUS,
EV_KEY, KEY_UP,
EV_KEY, KEY_LEFT,
EV_KEY, KEY_RIGHT,
EV_KEY, KEY_DOWN,
EV_KEY, KEY_MUTE,
EV_KEY, KEY_VOLUMEDOWN,
EV_KEY, KEY_VOLUMEUP,
EV_KEY, KEY_POWER,
EV_KEY, KEY_PAUSE,
EV_KEY, KEY_STOP,
EV_KEY, KEY_PROPS,
EV_KEY, KEY_UNDO,
EV_KEY, KEY_COPY,
EV_KEY, KEY_OPEN,
EV_KEY, KEY_PASTE,
EV_KEY, KEY_FIND,
EV_KEY, KEY_CUT,
EV_KEY, KEY_HELP,
EV_KEY, KEY_MENU,
EV_KEY, KEY_CALC,
EV_KEY, KEY_SLEEP,
EV_KEY, KEY_FILE,
EV_KEY, KEY_WWW,
EV_KEY, KEY_COFFEE,
EV_KEY, KEY_MAIL,
EV_KEY, KEY_BOOKMARKS,
EV_KEY, KEY_BACK,
EV_KEY, KEY_FORWARD,
EV_KEY, KEY_EJECTCD,
EV_KEY, KEY_NEXTSONG,
EV_KEY, KEY_PLAYPAUSE,
EV_KEY, KEY_PREVIOUSSONG,
EV_KEY, KEY_STOPCD,
EV_KEY, KEY_RECORD,
EV_KEY, KEY_REWIND,
EV_KEY, KEY_PHONE,
EV_KEY, KEY_CONFIG,
EV_KEY, KEY_HOMEPAGE,
EV_KEY, KEY_REFRESH,
EV_KEY, KEY_EXIT,
EV_KEY, KEY_SCROLLUP,
EV_KEY, KEY_SCROLLDOWN,
EV_KEY, KEY_NEW,
EV_KEY, KEY_CLOSE,
EV_KEY, KEY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REVIOUS,
EV_KEY, KEY_VIDEOPHONE,
EV_KEY, KEY_GAMES,
EV_KEY, KEY_ZOOMIN,
EV_KEY, KEY_ZOOMOUT,
EV_KEY, KEY_ZOOMRESET,
EV_KEY, KEY_WORDPROCESSOR,
EV_KEY, KEY_EDITOR,
EV_KEY, KEY_SPREADSHEET,
EV_KEY, KEY_GRAPHICSEDITOR,
EV_KEY, KEY_PRESENTATION,
EV_KEY, KEY_DATABASE,
EV_KEY, KEY_NEWS,
EV_KEY, KEY_VOICEMAIL,
EV_KEY, KEY_ADDRESSBOOK,
EV_KEY, KEY_MESSENGER,
EV_KEY, KEY_DISPLAYTOGGLE,
EV_KEY, KEY_SPELLCHECK,
EV_KEY, KEY_LOGOFF,
EV_KEY, KEY_MEDIA_REPEAT,
EV_KEY, KEY_IMAGES,
EV_KEY, KEY_BUTTONCONFIG,
EV_KEY, KEY_TASKMANAGER,
EV_KEY, KEY_JOURNAL,
EV_KEY, KEY_CONTROLPANEL,
EV_KEY, KEY_APPSELECT,
EV_KEY, KEY_SCREENSAVER,
EV_KEY, KEY_VOICECOMMAND,
EV_KEY, KEY_BRIGHTNESS_MIN,
EV_KEY, KEY_BRIGHTNESS_MAX,
-1 , -1,
};
static struct input_absinfo absinfo[] = {
{ ABS_VOLUME, 0, 572, 0, 0, 0 },
{ ABS_MISC, 0, 0, 0, 0, 0 },
{ ABS_MISC + 1, 0, 0, 0, 0, 0 },
{ ABS_MISC + 2, 0, 0, 0, 0, 0 },
{ ABS_MISC + 3, 0, 0, 0, 0, 0 },
{ .value = -1 }
};
struct litest_test_device litest_mouse_roccat_device = {
.type = LITEST_MOUSE_ROCCAT,
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL | LITEST_KEYS,
.shortname = "mouse_roccat",
.setup = litest_mouse_roccat_setup,
.interface = NULL,
.name = "ROCCAT ROCCAT Kone XTD",
.id = &input_id,
.absinfo = absinfo,
.events = events,
};
|