Coverage for linuxpy/input/raw.py: 100%

937 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-10-18 07:40 +0200

1# 

2# This file is part of the linuxpy project 

3# 

4# Copyright (c) 2023 Tiago Coutinho 

5# Distributed under the GPLv3 license. See LICENSE for more info. 

6 

7# This file has been generated by linuxpy.codegen.input 

8# Date: 2024-09-09 08:39:26.313509 

9# System: Linux 

10# Release: 6.10.6-amd64 

11# Version: #1 SMP PREEMPT_DYNAMIC Debian 6.10.6-1 (2024-08-19) 

12 

13import enum 

14 

15from linuxpy.ctypes import POINTER, Struct, Union, cchar, ccharp, cint, cuint, culonglong, i16, timeval, u8, u16 

16from linuxpy.ioctl import IO as _IO, IOR as _IOR, IOW as _IOW, IOWR as _IOWR 

17 

18 

19class Property(enum.IntEnum): 

20 POINTER = 0x00 # needs a pointer 

21 DIRECT = 0x01 # direct input devices 

22 BUTTONPAD = 0x02 # has button(s) under pad 

23 SEMI_MT = 0x03 # touch rectangle only 

24 TOPBUTTONPAD = 0x04 # softbuttons at top of pad 

25 POINTING_STICK = 0x05 # is a pointing stick 

26 ACCELEROMETER = 0x06 # has accelerometer 

27 MAX = 0x1F 

28 CNT = MAX + 1 

29 

30 

31class EventType(enum.IntEnum): 

32 SYN = 0x0 

33 KEY = 0x1 

34 REL = 0x2 

35 ABS = 0x3 

36 MSC = 0x4 

37 SW = 0x5 

38 LED = 0x11 

39 SND = 0x12 

40 REP = 0x14 

41 FF = 0x15 

42 PWR = 0x16 

43 FF_STATUS = 0x17 

44 MAX = 0x1F 

45 CNT = MAX + 1 

46 

47 

48class Key(enum.IntEnum): 

49 KEY_RESERVED = 0x0 

50 KEY_ESC = 0x1 

51 KEY_1 = 0x2 

52 KEY_2 = 0x3 

53 KEY_3 = 0x4 

54 KEY_4 = 0x5 

55 KEY_5 = 0x6 

56 KEY_6 = 0x7 

57 KEY_7 = 0x8 

58 KEY_8 = 0x9 

59 KEY_9 = 0xA 

60 KEY_0 = 0xB 

61 KEY_MINUS = 0xC 

62 KEY_EQUAL = 0xD 

63 KEY_BACKSPACE = 0xE 

64 KEY_TAB = 0xF 

65 KEY_Q = 0x10 

66 KEY_W = 0x11 

67 KEY_E = 0x12 

68 KEY_R = 0x13 

69 KEY_T = 0x14 

70 KEY_Y = 0x15 

71 KEY_U = 0x16 

72 KEY_I = 0x17 

73 KEY_O = 0x18 

74 KEY_P = 0x19 

75 KEY_LEFTBRACE = 0x1A 

76 KEY_RIGHTBRACE = 0x1B 

77 KEY_ENTER = 0x1C 

78 KEY_LEFTCTRL = 0x1D 

79 KEY_A = 0x1E 

80 KEY_S = 0x1F 

81 KEY_D = 0x20 

82 KEY_F = 0x21 

83 KEY_G = 0x22 

84 KEY_H = 0x23 

85 KEY_J = 0x24 

86 KEY_K = 0x25 

87 KEY_L = 0x26 

88 KEY_SEMICOLON = 0x27 

89 KEY_APOSTROPHE = 0x28 

90 KEY_GRAVE = 0x29 

91 KEY_LEFTSHIFT = 0x2A 

92 KEY_BACKSLASH = 0x2B 

93 KEY_Z = 0x2C 

94 KEY_X = 0x2D 

95 KEY_C = 0x2E 

96 KEY_V = 0x2F 

97 KEY_B = 0x30 

98 KEY_N = 0x31 

99 KEY_M = 0x32 

100 KEY_COMMA = 0x33 

101 KEY_DOT = 0x34 

102 KEY_SLASH = 0x35 

103 KEY_RIGHTSHIFT = 0x36 

104 KEY_KPASTERISK = 0x37 

105 KEY_LEFTALT = 0x38 

106 KEY_SPACE = 0x39 

107 KEY_CAPSLOCK = 0x3A 

108 KEY_F1 = 0x3B 

109 KEY_F2 = 0x3C 

110 KEY_F3 = 0x3D 

111 KEY_F4 = 0x3E 

112 KEY_F5 = 0x3F 

113 KEY_F6 = 0x40 

114 KEY_F7 = 0x41 

115 KEY_F8 = 0x42 

116 KEY_F9 = 0x43 

117 KEY_F10 = 0x44 

118 KEY_NUMLOCK = 0x45 

119 KEY_SCROLLLOCK = 0x46 

120 KEY_KP7 = 0x47 

121 KEY_KP8 = 0x48 

122 KEY_KP9 = 0x49 

123 KEY_KPMINUS = 0x4A 

124 KEY_KP4 = 0x4B 

125 KEY_KP5 = 0x4C 

126 KEY_KP6 = 0x4D 

127 KEY_KPPLUS = 0x4E 

128 KEY_KP1 = 0x4F 

129 KEY_KP2 = 0x50 

130 KEY_KP3 = 0x51 

131 KEY_KP0 = 0x52 

132 KEY_KPDOT = 0x53 

133 KEY_ZENKAKUHANKAKU = 0x55 

134 KEY_102ND = 0x56 

135 KEY_F11 = 0x57 

136 KEY_F12 = 0x58 

137 KEY_RO = 0x59 

138 KEY_KATAKANA = 0x5A 

139 KEY_HIRAGANA = 0x5B 

140 KEY_HENKAN = 0x5C 

141 KEY_KATAKANAHIRAGANA = 0x5D 

142 KEY_MUHENKAN = 0x5E 

143 KEY_KPJPCOMMA = 0x5F 

144 KEY_KPENTER = 0x60 

145 KEY_RIGHTCTRL = 0x61 

146 KEY_KPSLASH = 0x62 

147 KEY_SYSRQ = 0x63 

148 KEY_RIGHTALT = 0x64 

149 KEY_LINEFEED = 0x65 

150 KEY_HOME = 0x66 

151 KEY_UP = 0x67 

152 KEY_PAGEUP = 0x68 

153 KEY_LEFT = 0x69 

154 KEY_RIGHT = 0x6A 

155 KEY_END = 0x6B 

156 KEY_DOWN = 0x6C 

157 KEY_PAGEDOWN = 0x6D 

158 KEY_INSERT = 0x6E 

159 KEY_DELETE = 0x6F 

160 KEY_MACRO = 0x70 

161 KEY_MUTE = 0x71 

162 KEY_VOLUMEDOWN = 0x72 

163 KEY_VOLUMEUP = 0x73 

164 KEY_POWER = 116 # SC System Power Down 

165 KEY_KPEQUAL = 0x75 

166 KEY_KPPLUSMINUS = 0x76 

167 KEY_PAUSE = 0x77 

168 KEY_SCALE = 120 # AL Compiz Scale (Expose) 

169 KEY_KPCOMMA = 0x79 

170 KEY_HANGEUL = 0x7A 

171 KEY_HANGUEL = KEY_HANGEUL 

172 KEY_HANJA = 0x7B 

173 KEY_YEN = 0x7C 

174 KEY_LEFTMETA = 0x7D 

175 KEY_RIGHTMETA = 0x7E 

176 KEY_COMPOSE = 0x7F 

177 KEY_STOP = 128 # AC Stop 

178 KEY_AGAIN = 0x81 

179 KEY_PROPS = 130 # AC Properties 

180 KEY_UNDO = 131 # AC Undo 

181 KEY_FRONT = 0x84 

182 KEY_COPY = 133 # AC Copy 

183 KEY_OPEN = 134 # AC Open 

184 KEY_PASTE = 135 # AC Paste 

185 KEY_FIND = 136 # AC Search 

186 KEY_CUT = 137 # AC Cut 

187 KEY_HELP = 138 # AL Integrated Help Center 

188 KEY_MENU = 139 # Menu (show menu) 

189 KEY_CALC = 140 # AL Calculator 

190 KEY_SETUP = 0x8D 

191 KEY_SLEEP = 142 # SC System Sleep 

192 KEY_WAKEUP = 143 # System Wake Up 

193 KEY_FILE = 144 # AL Local Machine Browser 

194 KEY_SENDFILE = 0x91 

195 KEY_DELETEFILE = 0x92 

196 KEY_XFER = 0x93 

197 KEY_PROG1 = 0x94 

198 KEY_PROG2 = 0x95 

199 KEY_WWW = 150 # AL Internet Browser 

200 KEY_MSDOS = 0x97 

201 KEY_COFFEE = 152 # AL Terminal Lock/Screensaver 

202 KEY_SCREENLOCK = KEY_COFFEE 

203 KEY_ROTATE_DISPLAY = 153 # Display orientation for e.g. tablets 

204 KEY_DIRECTION = KEY_ROTATE_DISPLAY 

205 KEY_CYCLEWINDOWS = 0x9A 

206 KEY_MAIL = 0x9B 

207 KEY_BOOKMARKS = 156 # AC Bookmarks 

208 KEY_COMPUTER = 0x9D 

209 KEY_BACK = 158 # AC Back 

210 KEY_FORWARD = 159 # AC Forward 

211 KEY_CLOSECD = 0xA0 

212 KEY_EJECTCD = 0xA1 

213 KEY_EJECTCLOSECD = 0xA2 

214 KEY_NEXTSONG = 0xA3 

215 KEY_PLAYPAUSE = 0xA4 

216 KEY_PREVIOUSSONG = 0xA5 

217 KEY_STOPCD = 0xA6 

218 KEY_RECORD = 0xA7 

219 KEY_REWIND = 0xA8 

220 KEY_PHONE = 169 # Media Select Telephone 

221 KEY_ISO = 0xAA 

222 KEY_CONFIG = 171 # AL Consumer Control Configuration 

223 KEY_HOMEPAGE = 172 # AC Home 

224 KEY_REFRESH = 173 # AC Refresh 

225 KEY_EXIT = 174 # AC Exit 

226 KEY_MOVE = 0xAF 

227 KEY_EDIT = 0xB0 

228 KEY_SCROLLUP = 0xB1 

229 KEY_SCROLLDOWN = 0xB2 

230 KEY_KPLEFTPAREN = 0xB3 

231 KEY_KPRIGHTPAREN = 0xB4 

232 KEY_NEW = 181 # AC New 

233 KEY_REDO = 182 # AC Redo/Repeat 

234 KEY_F13 = 0xB7 

235 KEY_F14 = 0xB8 

236 KEY_F15 = 0xB9 

237 KEY_F16 = 0xBA 

238 KEY_F17 = 0xBB 

239 KEY_F18 = 0xBC 

240 KEY_F19 = 0xBD 

241 KEY_F20 = 0xBE 

242 KEY_F21 = 0xBF 

243 KEY_F22 = 0xC0 

244 KEY_F23 = 0xC1 

245 KEY_F24 = 0xC2 

246 KEY_PLAYCD = 0xC8 

247 KEY_PAUSECD = 0xC9 

248 KEY_PROG3 = 0xCA 

249 KEY_PROG4 = 0xCB 

250 KEY_ALL_APPLICATIONS = 204 # AC Desktop Show All Applications 

251 KEY_DASHBOARD = KEY_ALL_APPLICATIONS 

252 KEY_SUSPEND = 0xCD 

253 KEY_CLOSE = 206 # AC Close 

254 KEY_PLAY = 0xCF 

255 KEY_FASTFORWARD = 0xD0 

256 KEY_BASSBOOST = 0xD1 

257 KEY_PRINT = 210 # AC Print 

258 KEY_HP = 0xD3 

259 KEY_CAMERA = 0xD4 

260 KEY_SOUND = 0xD5 

261 KEY_QUESTION = 0xD6 

262 KEY_EMAIL = 0xD7 

263 KEY_CHAT = 0xD8 

264 KEY_SEARCH = 0xD9 

265 KEY_CONNECT = 0xDA 

266 KEY_FINANCE = 219 # AL Checkbook/Finance 

267 KEY_SPORT = 0xDC 

268 KEY_SHOP = 0xDD 

269 KEY_ALTERASE = 0xDE 

270 KEY_CANCEL = 223 # AC Cancel 

271 KEY_BRIGHTNESSDOWN = 0xE0 

272 KEY_BRIGHTNESSUP = 0xE1 

273 KEY_MEDIA = 0xE2 

274 KEY_SWITCHVIDEOMODE = 227 # Cycle between available video 

275 KEY_KBDILLUMTOGGLE = 0xE4 

276 KEY_KBDILLUMDOWN = 0xE5 

277 KEY_KBDILLUMUP = 0xE6 

278 KEY_SEND = 231 # AC Send 

279 KEY_REPLY = 232 # AC Reply 

280 KEY_FORWARDMAIL = 233 # AC Forward Msg 

281 KEY_SAVE = 234 # AC Save 

282 KEY_DOCUMENTS = 0xEB 

283 KEY_BATTERY = 0xEC 

284 KEY_BLUETOOTH = 0xED 

285 KEY_WLAN = 0xEE 

286 KEY_UWB = 0xEF 

287 KEY_UNKNOWN = 0xF0 

288 KEY_VIDEO_NEXT = 241 # drive next video source 

289 KEY_VIDEO_PREV = 242 # drive previous video source 

290 KEY_BRIGHTNESS_CYCLE = 243 # brightness up, after max is min 

291 KEY_BRIGHTNESS_AUTO = 244 # Set Auto Brightness: manual 

292 KEY_BRIGHTNESS_ZERO = KEY_BRIGHTNESS_AUTO 

293 KEY_DISPLAY_OFF = 245 # display device to off state 

294 KEY_WWAN = 246 # Wireless WAN (LTE, UMTS, GSM, etc.) 

295 KEY_WIMAX = KEY_WWAN 

296 KEY_RFKILL = 247 # Key that controls all radios 

297 KEY_MICMUTE = 248 # Mute / unmute the microphone 

298 BTN_MISC = 0x100 

299 BTN_0 = 0x100 

300 BTN_1 = 0x101 

301 BTN_2 = 0x102 

302 BTN_3 = 0x103 

303 BTN_4 = 0x104 

304 BTN_5 = 0x105 

305 BTN_6 = 0x106 

306 BTN_7 = 0x107 

307 BTN_8 = 0x108 

308 BTN_9 = 0x109 

309 BTN_MOUSE = 0x110 

310 BTN_LEFT = 0x110 

311 BTN_RIGHT = 0x111 

312 BTN_MIDDLE = 0x112 

313 BTN_SIDE = 0x113 

314 BTN_EXTRA = 0x114 

315 BTN_FORWARD = 0x115 

316 BTN_BACK = 0x116 

317 BTN_TASK = 0x117 

318 BTN_JOYSTICK = 0x120 

319 BTN_TRIGGER = 0x120 

320 BTN_THUMB = 0x121 

321 BTN_THUMB2 = 0x122 

322 BTN_TOP = 0x123 

323 BTN_TOP2 = 0x124 

324 BTN_PINKIE = 0x125 

325 BTN_BASE = 0x126 

326 BTN_BASE2 = 0x127 

327 BTN_BASE3 = 0x128 

328 BTN_BASE4 = 0x129 

329 BTN_BASE5 = 0x12A 

330 BTN_BASE6 = 0x12B 

331 BTN_DEAD = 0x12F 

332 BTN_GAMEPAD = 0x130 

333 BTN_SOUTH = 0x130 

334 BTN_A = BTN_SOUTH 

335 BTN_EAST = 0x131 

336 BTN_B = BTN_EAST 

337 BTN_C = 0x132 

338 BTN_NORTH = 0x133 

339 BTN_X = BTN_NORTH 

340 BTN_WEST = 0x134 

341 BTN_Y = BTN_WEST 

342 BTN_Z = 0x135 

343 BTN_TL = 0x136 

344 BTN_TR = 0x137 

345 BTN_TL2 = 0x138 

346 BTN_TR2 = 0x139 

347 BTN_SELECT = 0x13A 

348 BTN_START = 0x13B 

349 BTN_MODE = 0x13C 

350 BTN_THUMBL = 0x13D 

351 BTN_THUMBR = 0x13E 

352 BTN_DIGI = 0x140 

353 BTN_TOOL_PEN = 0x140 

354 BTN_TOOL_RUBBER = 0x141 

355 BTN_TOOL_BRUSH = 0x142 

356 BTN_TOOL_PENCIL = 0x143 

357 BTN_TOOL_AIRBRUSH = 0x144 

358 BTN_TOOL_FINGER = 0x145 

359 BTN_TOOL_MOUSE = 0x146 

360 BTN_TOOL_LENS = 0x147 

361 BTN_TOOL_QUINTTAP = 0x148 # Five fingers on trackpad 

362 BTN_STYLUS3 = 0x149 

363 BTN_TOUCH = 0x14A 

364 BTN_STYLUS = 0x14B 

365 BTN_STYLUS2 = 0x14C 

366 BTN_TOOL_DOUBLETAP = 0x14D 

367 BTN_TOOL_TRIPLETAP = 0x14E 

368 BTN_TOOL_QUADTAP = 0x14F # Four fingers on trackpad 

369 BTN_WHEEL = 0x150 

370 BTN_GEAR_DOWN = 0x150 

371 BTN_GEAR_UP = 0x151 

372 KEY_OK = 0x160 

373 KEY_SELECT = 0x161 

374 KEY_GOTO = 0x162 

375 KEY_CLEAR = 0x163 

376 KEY_POWER2 = 0x164 

377 KEY_OPTION = 0x165 

378 KEY_INFO = 0x166 # AL OEM Features/Tips/Tutorial 

379 KEY_TIME = 0x167 

380 KEY_VENDOR = 0x168 

381 KEY_ARCHIVE = 0x169 

382 KEY_PROGRAM = 0x16A # Media Select Program Guide 

383 KEY_CHANNEL = 0x16B 

384 KEY_FAVORITES = 0x16C 

385 KEY_EPG = 0x16D 

386 KEY_PVR = 0x16E # Media Select Home 

387 KEY_MHP = 0x16F 

388 KEY_LANGUAGE = 0x170 

389 KEY_TITLE = 0x171 

390 KEY_SUBTITLE = 0x172 

391 KEY_ANGLE = 0x173 

392 KEY_FULL_SCREEN = 0x174 # AC View Toggle 

393 KEY_ZOOM = KEY_FULL_SCREEN 

394 KEY_MODE = 0x175 

395 KEY_KEYBOARD = 0x176 

396 KEY_ASPECT_RATIO = 0x177 # HUTRR37: Aspect 

397 KEY_SCREEN = KEY_ASPECT_RATIO 

398 KEY_PC = 0x178 # Media Select Computer 

399 KEY_TV = 0x179 # Media Select TV 

400 KEY_TV2 = 0x17A # Media Select Cable 

401 KEY_VCR = 0x17B # Media Select VCR 

402 KEY_VCR2 = 0x17C # VCR Plus 

403 KEY_SAT = 0x17D # Media Select Satellite 

404 KEY_SAT2 = 0x17E 

405 KEY_CD = 0x17F # Media Select CD 

406 KEY_TAPE = 0x180 # Media Select Tape 

407 KEY_RADIO = 0x181 

408 KEY_TUNER = 0x182 # Media Select Tuner 

409 KEY_PLAYER = 0x183 

410 KEY_TEXT = 0x184 

411 KEY_DVD = 0x185 # Media Select DVD 

412 KEY_AUX = 0x186 

413 KEY_MP3 = 0x187 

414 KEY_AUDIO = 0x188 # AL Audio Browser 

415 KEY_VIDEO = 0x189 # AL Movie Browser 

416 KEY_DIRECTORY = 0x18A 

417 KEY_LIST = 0x18B 

418 KEY_MEMO = 0x18C # Media Select Messages 

419 KEY_CALENDAR = 0x18D 

420 KEY_RED = 0x18E 

421 KEY_GREEN = 0x18F 

422 KEY_YELLOW = 0x190 

423 KEY_BLUE = 0x191 

424 KEY_CHANNELUP = 0x192 # Channel Increment 

425 KEY_CHANNELDOWN = 0x193 # Channel Decrement 

426 KEY_FIRST = 0x194 

427 KEY_LAST = 0x195 # Recall Last 

428 KEY_AB = 0x196 

429 KEY_NEXT = 0x197 

430 KEY_RESTART = 0x198 

431 KEY_SLOW = 0x199 

432 KEY_SHUFFLE = 0x19A 

433 KEY_BREAK = 0x19B 

434 KEY_PREVIOUS = 0x19C 

435 KEY_DIGITS = 0x19D 

436 KEY_TEEN = 0x19E 

437 KEY_TWEN = 0x19F 

438 KEY_VIDEOPHONE = 0x1A0 # Media Select Video Phone 

439 KEY_GAMES = 0x1A1 # Media Select Games 

440 KEY_ZOOMIN = 0x1A2 # AC Zoom In 

441 KEY_ZOOMOUT = 0x1A3 # AC Zoom Out 

442 KEY_ZOOMRESET = 0x1A4 # AC Zoom 

443 KEY_WORDPROCESSOR = 0x1A5 # AL Word Processor 

444 KEY_EDITOR = 0x1A6 # AL Text Editor 

445 KEY_SPREADSHEET = 0x1A7 # AL Spreadsheet 

446 KEY_GRAPHICSEDITOR = 0x1A8 # AL Graphics Editor 

447 KEY_PRESENTATION = 0x1A9 # AL Presentation App 

448 KEY_DATABASE = 0x1AA # AL Database App 

449 KEY_NEWS = 0x1AB # AL Newsreader 

450 KEY_VOICEMAIL = 0x1AC # AL Voicemail 

451 KEY_ADDRESSBOOK = 0x1AD # AL Contacts/Address Book 

452 KEY_MESSENGER = 0x1AE # AL Instant Messaging 

453 KEY_DISPLAYTOGGLE = 0x1AF # Turn display (LCD) on and off 

454 KEY_BRIGHTNESS_TOGGLE = KEY_DISPLAYTOGGLE 

455 KEY_SPELLCHECK = 0x1B0 # AL Spell Check 

456 KEY_LOGOFF = 0x1B1 # AL Logoff 

457 KEY_DOLLAR = 0x1B2 

458 KEY_EURO = 0x1B3 

459 KEY_FRAMEBACK = 0x1B4 # Consumer - transport controls 

460 KEY_FRAMEFORWARD = 0x1B5 

461 KEY_CONTEXT_MENU = 0x1B6 # GenDesc - system context menu 

462 KEY_MEDIA_REPEAT = 0x1B7 # Consumer - transport control 

463 KEY_10CHANNELSUP = 0x1B8 # 10 channels up (10+) 

464 KEY_10CHANNELSDOWN = 0x1B9 # 10 channels down (10-) 

465 KEY_IMAGES = 0x1BA # AL Image Browser 

466 KEY_NOTIFICATION_CENTER = 0x1BC # Show/hide the notification center 

467 KEY_PICKUP_PHONE = 0x1BD # Answer incoming call 

468 KEY_HANGUP_PHONE = 0x1BE # Decline incoming call 

469 KEY_DEL_EOL = 0x1C0 

470 KEY_DEL_EOS = 0x1C1 

471 KEY_INS_LINE = 0x1C2 

472 KEY_DEL_LINE = 0x1C3 

473 KEY_FN = 0x1D0 

474 KEY_FN_ESC = 0x1D1 

475 KEY_FN_F1 = 0x1D2 

476 KEY_FN_F2 = 0x1D3 

477 KEY_FN_F3 = 0x1D4 

478 KEY_FN_F4 = 0x1D5 

479 KEY_FN_F5 = 0x1D6 

480 KEY_FN_F6 = 0x1D7 

481 KEY_FN_F7 = 0x1D8 

482 KEY_FN_F8 = 0x1D9 

483 KEY_FN_F9 = 0x1DA 

484 KEY_FN_F10 = 0x1DB 

485 KEY_FN_F11 = 0x1DC 

486 KEY_FN_F12 = 0x1DD 

487 KEY_FN_1 = 0x1DE 

488 KEY_FN_2 = 0x1DF 

489 KEY_FN_D = 0x1E0 

490 KEY_FN_E = 0x1E1 

491 KEY_FN_F = 0x1E2 

492 KEY_FN_S = 0x1E3 

493 KEY_FN_B = 0x1E4 

494 KEY_FN_RIGHT_SHIFT = 0x1E5 

495 KEY_BRL_DOT1 = 0x1F1 

496 KEY_BRL_DOT2 = 0x1F2 

497 KEY_BRL_DOT3 = 0x1F3 

498 KEY_BRL_DOT4 = 0x1F4 

499 KEY_BRL_DOT5 = 0x1F5 

500 KEY_BRL_DOT6 = 0x1F6 

501 KEY_BRL_DOT7 = 0x1F7 

502 KEY_BRL_DOT8 = 0x1F8 

503 KEY_BRL_DOT9 = 0x1F9 

504 KEY_BRL_DOT10 = 0x1FA 

505 KEY_NUMERIC_0 = 0x200 # used by phones, remote controls, 

506 KEY_NUMERIC_1 = 0x201 # and other keypads 

507 KEY_NUMERIC_2 = 0x202 

508 KEY_NUMERIC_3 = 0x203 

509 KEY_NUMERIC_4 = 0x204 

510 KEY_NUMERIC_5 = 0x205 

511 KEY_NUMERIC_6 = 0x206 

512 KEY_NUMERIC_7 = 0x207 

513 KEY_NUMERIC_8 = 0x208 

514 KEY_NUMERIC_9 = 0x209 

515 KEY_NUMERIC_STAR = 0x20A 

516 KEY_NUMERIC_POUND = 0x20B 

517 KEY_NUMERIC_A = 0x20C # Phone key A - HUT Telephony 0xb9 

518 KEY_NUMERIC_B = 0x20D 

519 KEY_NUMERIC_C = 0x20E 

520 KEY_NUMERIC_D = 0x20F 

521 KEY_CAMERA_FOCUS = 0x210 

522 KEY_WPS_BUTTON = 0x211 # WiFi Protected Setup key 

523 KEY_TOUCHPAD_TOGGLE = 0x212 # Request switch touchpad on or off 

524 KEY_TOUCHPAD_ON = 0x213 

525 KEY_TOUCHPAD_OFF = 0x214 

526 KEY_CAMERA_ZOOMIN = 0x215 

527 KEY_CAMERA_ZOOMOUT = 0x216 

528 KEY_CAMERA_UP = 0x217 

529 KEY_CAMERA_DOWN = 0x218 

530 KEY_CAMERA_LEFT = 0x219 

531 KEY_CAMERA_RIGHT = 0x21A 

532 KEY_ATTENDANT_ON = 0x21B 

533 KEY_ATTENDANT_OFF = 0x21C 

534 KEY_ATTENDANT_TOGGLE = 0x21D # Attendant call on or off 

535 KEY_LIGHTS_TOGGLE = 0x21E # Reading light on or off 

536 BTN_DPAD_UP = 0x220 

537 BTN_DPAD_DOWN = 0x221 

538 BTN_DPAD_LEFT = 0x222 

539 BTN_DPAD_RIGHT = 0x223 

540 KEY_ALS_TOGGLE = 0x230 # Ambient light sensor 

541 KEY_ROTATE_LOCK_TOGGLE = 0x231 # Display rotation lock 

542 KEY_REFRESH_RATE_TOGGLE = 0x232 # Display refresh rate toggle 

543 KEY_BUTTONCONFIG = 0x240 # AL Button Configuration 

544 KEY_TASKMANAGER = 0x241 # AL Task/Project Manager 

545 KEY_JOURNAL = 0x242 # AL Log/Journal/Timecard 

546 KEY_CONTROLPANEL = 0x243 # AL Control Panel 

547 KEY_APPSELECT = 0x244 # AL Select Task/Application 

548 KEY_SCREENSAVER = 0x245 # AL Screen Saver 

549 KEY_VOICECOMMAND = 0x246 # Listening Voice Command 

550 KEY_ASSISTANT = 0x247 # AL Context-aware desktop assistant 

551 KEY_KBD_LAYOUT_NEXT = 0x248 # AC Next Keyboard Layout Select 

552 KEY_EMOJI_PICKER = 0x249 # Show/hide emoji picker (HUTRR101) 

553 KEY_DICTATE = 0x24A # Start or Stop Voice Dictation Session (HUTRR99) 

554 KEY_CAMERA_ACCESS_ENABLE = 0x24B # Enables programmatic access to camera devices. (HUTRR72) 

555 KEY_CAMERA_ACCESS_DISABLE = 0x24C # Disables programmatic access to camera devices. (HUTRR72) 

556 KEY_CAMERA_ACCESS_TOGGLE = 0x24D # Toggles the current state of the camera access control. (HUTRR72) 

557 KEY_ACCESSIBILITY = 0x24E # Toggles the system bound accessibility UI/command (HUTRR116) 

558 KEY_DO_NOT_DISTURB = 0x24F # Toggles the system-wide "Do Not Disturb" control (HUTRR94) 

559 KEY_BRIGHTNESS_MIN = 0x250 # Set Brightness to Minimum 

560 KEY_BRIGHTNESS_MAX = 0x251 # Set Brightness to Maximum 

561 KEY_KBDINPUTASSIST_PREV = 0x260 

562 KEY_KBDINPUTASSIST_NEXT = 0x261 

563 KEY_KBDINPUTASSIST_PREVGROUP = 0x262 

564 KEY_KBDINPUTASSIST_NEXTGROUP = 0x263 

565 KEY_KBDINPUTASSIST_ACCEPT = 0x264 

566 KEY_KBDINPUTASSIST_CANCEL = 0x265 

567 KEY_RIGHT_UP = 0x266 

568 KEY_RIGHT_DOWN = 0x267 

569 KEY_LEFT_UP = 0x268 

570 KEY_LEFT_DOWN = 0x269 

571 KEY_ROOT_MENU = 0x26A # Show Device's Root Menu 

572 KEY_MEDIA_TOP_MENU = 0x26B 

573 KEY_NUMERIC_11 = 0x26C 

574 KEY_NUMERIC_12 = 0x26D 

575 KEY_AUDIO_DESC = 0x26E 

576 KEY_3D_MODE = 0x26F 

577 KEY_NEXT_FAVORITE = 0x270 

578 KEY_STOP_RECORD = 0x271 

579 KEY_PAUSE_RECORD = 0x272 

580 KEY_VOD = 0x273 # Video on Demand 

581 KEY_UNMUTE = 0x274 

582 KEY_FASTREVERSE = 0x275 

583 KEY_SLOWREVERSE = 0x276 

584 KEY_DATA = 0x277 

585 KEY_ONSCREEN_KEYBOARD = 0x278 

586 KEY_PRIVACY_SCREEN_TOGGLE = 0x279 

587 KEY_SELECTIVE_SCREENSHOT = 0x27A 

588 KEY_NEXT_ELEMENT = 0x27B 

589 KEY_PREVIOUS_ELEMENT = 0x27C 

590 KEY_AUTOPILOT_ENGAGE_TOGGLE = 0x27D 

591 KEY_MARK_WAYPOINT = 0x27E 

592 KEY_SOS = 0x27F 

593 KEY_NAV_CHART = 0x280 

594 KEY_FISHING_CHART = 0x281 

595 KEY_SINGLE_RANGE_RADAR = 0x282 

596 KEY_DUAL_RANGE_RADAR = 0x283 

597 KEY_RADAR_OVERLAY = 0x284 

598 KEY_TRADITIONAL_SONAR = 0x285 

599 KEY_CLEARVU_SONAR = 0x286 

600 KEY_SIDEVU_SONAR = 0x287 

601 KEY_NAV_INFO = 0x288 

602 KEY_BRIGHTNESS_MENU = 0x289 

603 KEY_MACRO1 = 0x290 

604 KEY_MACRO2 = 0x291 

605 KEY_MACRO3 = 0x292 

606 KEY_MACRO4 = 0x293 

607 KEY_MACRO5 = 0x294 

608 KEY_MACRO6 = 0x295 

609 KEY_MACRO7 = 0x296 

610 KEY_MACRO8 = 0x297 

611 KEY_MACRO9 = 0x298 

612 KEY_MACRO10 = 0x299 

613 KEY_MACRO11 = 0x29A 

614 KEY_MACRO12 = 0x29B 

615 KEY_MACRO13 = 0x29C 

616 KEY_MACRO14 = 0x29D 

617 KEY_MACRO15 = 0x29E 

618 KEY_MACRO16 = 0x29F 

619 KEY_MACRO17 = 0x2A0 

620 KEY_MACRO18 = 0x2A1 

621 KEY_MACRO19 = 0x2A2 

622 KEY_MACRO20 = 0x2A3 

623 KEY_MACRO21 = 0x2A4 

624 KEY_MACRO22 = 0x2A5 

625 KEY_MACRO23 = 0x2A6 

626 KEY_MACRO24 = 0x2A7 

627 KEY_MACRO25 = 0x2A8 

628 KEY_MACRO26 = 0x2A9 

629 KEY_MACRO27 = 0x2AA 

630 KEY_MACRO28 = 0x2AB 

631 KEY_MACRO29 = 0x2AC 

632 KEY_MACRO30 = 0x2AD 

633 KEY_MACRO_RECORD_START = 0x2B0 

634 KEY_MACRO_RECORD_STOP = 0x2B1 

635 KEY_MACRO_PRESET_CYCLE = 0x2B2 

636 KEY_MACRO_PRESET1 = 0x2B3 

637 KEY_MACRO_PRESET2 = 0x2B4 

638 KEY_MACRO_PRESET3 = 0x2B5 

639 KEY_KBD_LCD_MENU1 = 0x2B8 

640 KEY_KBD_LCD_MENU2 = 0x2B9 

641 KEY_KBD_LCD_MENU3 = 0x2BA 

642 KEY_KBD_LCD_MENU4 = 0x2BB 

643 KEY_KBD_LCD_MENU5 = 0x2BC 

644 BTN_TRIGGER_HAPPY = 0x2C0 

645 BTN_TRIGGER_HAPPY1 = 0x2C0 

646 BTN_TRIGGER_HAPPY2 = 0x2C1 

647 BTN_TRIGGER_HAPPY3 = 0x2C2 

648 BTN_TRIGGER_HAPPY4 = 0x2C3 

649 BTN_TRIGGER_HAPPY5 = 0x2C4 

650 BTN_TRIGGER_HAPPY6 = 0x2C5 

651 BTN_TRIGGER_HAPPY7 = 0x2C6 

652 BTN_TRIGGER_HAPPY8 = 0x2C7 

653 BTN_TRIGGER_HAPPY9 = 0x2C8 

654 BTN_TRIGGER_HAPPY10 = 0x2C9 

655 BTN_TRIGGER_HAPPY11 = 0x2CA 

656 BTN_TRIGGER_HAPPY12 = 0x2CB 

657 BTN_TRIGGER_HAPPY13 = 0x2CC 

658 BTN_TRIGGER_HAPPY14 = 0x2CD 

659 BTN_TRIGGER_HAPPY15 = 0x2CE 

660 BTN_TRIGGER_HAPPY16 = 0x2CF 

661 BTN_TRIGGER_HAPPY17 = 0x2D0 

662 BTN_TRIGGER_HAPPY18 = 0x2D1 

663 BTN_TRIGGER_HAPPY19 = 0x2D2 

664 BTN_TRIGGER_HAPPY20 = 0x2D3 

665 BTN_TRIGGER_HAPPY21 = 0x2D4 

666 BTN_TRIGGER_HAPPY22 = 0x2D5 

667 BTN_TRIGGER_HAPPY23 = 0x2D6 

668 BTN_TRIGGER_HAPPY24 = 0x2D7 

669 BTN_TRIGGER_HAPPY25 = 0x2D8 

670 BTN_TRIGGER_HAPPY26 = 0x2D9 

671 BTN_TRIGGER_HAPPY27 = 0x2DA 

672 BTN_TRIGGER_HAPPY28 = 0x2DB 

673 BTN_TRIGGER_HAPPY29 = 0x2DC 

674 BTN_TRIGGER_HAPPY30 = 0x2DD 

675 BTN_TRIGGER_HAPPY31 = 0x2DE 

676 BTN_TRIGGER_HAPPY32 = 0x2DF 

677 BTN_TRIGGER_HAPPY33 = 0x2E0 

678 BTN_TRIGGER_HAPPY34 = 0x2E1 

679 BTN_TRIGGER_HAPPY35 = 0x2E2 

680 BTN_TRIGGER_HAPPY36 = 0x2E3 

681 BTN_TRIGGER_HAPPY37 = 0x2E4 

682 BTN_TRIGGER_HAPPY38 = 0x2E5 

683 BTN_TRIGGER_HAPPY39 = 0x2E6 

684 BTN_TRIGGER_HAPPY40 = 0x2E7 

685 KEY_MIN_INTERESTING = KEY_MUTE 

686 KEY_MAX = 0x2FF 

687 KEY_CNT = KEY_MAX + 1 

688 

689 

690class Relative(enum.IntEnum): 

691 X = 0x0 

692 Y = 0x1 

693 Z = 0x2 

694 RX = 0x3 

695 RY = 0x4 

696 RZ = 0x5 

697 HWHEEL = 0x6 

698 DIAL = 0x7 

699 WHEEL = 0x8 

700 MISC = 0x9 

701 RESERVED = 0xA 

702 WHEEL_HI_RES = 0xB 

703 HWHEEL_HI_RES = 0xC 

704 MAX = 0xF 

705 CNT = MAX + 1 

706 

707 

708class Absolute(enum.IntEnum): 

709 X = 0x0 

710 Y = 0x1 

711 Z = 0x2 

712 RX = 0x3 

713 RY = 0x4 

714 RZ = 0x5 

715 THROTTLE = 0x6 

716 RUDDER = 0x7 

717 WHEEL = 0x8 

718 GAS = 0x9 

719 BRAKE = 0xA 

720 HAT0X = 0x10 

721 HAT0Y = 0x11 

722 HAT1X = 0x12 

723 HAT1Y = 0x13 

724 HAT2X = 0x14 

725 HAT2Y = 0x15 

726 HAT3X = 0x16 

727 HAT3Y = 0x17 

728 PRESSURE = 0x18 

729 DISTANCE = 0x19 

730 TILT_X = 0x1A 

731 TILT_Y = 0x1B 

732 TOOL_WIDTH = 0x1C 

733 VOLUME = 0x20 

734 PROFILE = 0x21 

735 MISC = 0x28 

736 RESERVED = 0x2E 

737 MT_SLOT = 0x2F # MT slot being modified 

738 MT_TOUCH_MAJOR = 0x30 # Major axis of touching ellipse 

739 MT_TOUCH_MINOR = 0x31 # Minor axis (omit if circular) 

740 MT_WIDTH_MAJOR = 0x32 # Major axis of approaching ellipse 

741 MT_WIDTH_MINOR = 0x33 # Minor axis (omit if circular) 

742 MT_ORIENTATION = 0x34 # Ellipse orientation 

743 MT_POSITION_X = 0x35 # Center X touch position 

744 MT_POSITION_Y = 0x36 # Center Y touch position 

745 MT_TOOL_TYPE = 0x37 # Type of touching device 

746 MT_BLOB_ID = 0x38 # Group a set of packets as a blob 

747 MT_TRACKING_ID = 0x39 # Unique ID of initiated contact 

748 MT_PRESSURE = 0x3A # Pressure on contact area 

749 MT_DISTANCE = 0x3B # Contact hover distance 

750 MT_TOOL_X = 0x3C # Center X tool position 

751 MT_TOOL_Y = 0x3D # Center Y tool position 

752 MAX = 0x3F 

753 CNT = MAX + 1 

754 

755 

756class Miscelaneous(enum.IntEnum): 

757 SERIAL = 0x0 

758 PULSELED = 0x1 

759 GESTURE = 0x2 

760 RAW = 0x3 

761 SCAN = 0x4 

762 TIMESTAMP = 0x5 

763 MAX = 0x7 

764 CNT = MAX + 1 

765 

766 

767class Synchronization(enum.IntEnum): 

768 REPORT = 0x0 

769 CONFIG = 0x1 

770 MT_REPORT = 0x2 

771 DROPPED = 0x3 

772 MAX = 0xF 

773 CNT = MAX + 1 

774 

775 

776class Led(enum.IntEnum): 

777 NUML = 0x0 

778 CAPSL = 0x1 

779 SCROLLL = 0x2 

780 COMPOSE = 0x3 

781 KANA = 0x4 

782 SLEEP = 0x5 

783 SUSPEND = 0x6 

784 MUTE = 0x7 

785 MISC = 0x8 

786 MAIL = 0x9 

787 CHARGING = 0xA 

788 MAX = 0xF 

789 CNT = MAX + 1 

790 

791 

792class ID(enum.IntEnum): 

793 BUS = 0x0 

794 VENDOR = 0x1 

795 PRODUCT = 0x2 

796 VERSION = 0x3 

797 

798 

799class Bus(enum.IntEnum): 

800 PCI = 0x1 

801 ISAPNP = 0x2 

802 USB = 0x3 

803 HIL = 0x4 

804 BLUETOOTH = 0x5 

805 VIRTUAL = 0x6 

806 ISA = 0x10 

807 I8042 = 0x11 

808 XTKBD = 0x12 

809 RS232 = 0x13 

810 GAMEPORT = 0x14 

811 PARPORT = 0x15 

812 AMIGA = 0x16 

813 ADB = 0x17 

814 I2C = 0x18 

815 HOST = 0x19 

816 GSC = 0x1A 

817 ATARI = 0x1B 

818 SPI = 0x1C 

819 RMI = 0x1D 

820 CEC = 0x1E 

821 INTEL_ISHTP = 0x1F 

822 AMD_SFH = 0x20 

823 

824 

825class MultiTouch(enum.IntEnum): 

826 FINGER = 0x0 

827 PEN = 0x1 

828 PALM = 0x2 

829 DIAL = 0xA 

830 MAX = 0xF 

831 

832 

833class ForceFeedbackStatus(enum.IntEnum): 

834 STOPPED = 0x0 

835 PLAYING = 0x1 

836 MAX = 0x1 

837 

838 

839class ForceFeedback(enum.IntEnum): 

840 RUMBLE = 0x50 

841 PERIODIC = 0x51 

842 CONSTANT = 0x52 

843 SPRING = 0x53 

844 FRICTION = 0x54 

845 DAMPER = 0x55 

846 INERTIA = 0x56 

847 RAMP = 0x57 

848 EFFECT_MIN = RUMBLE 

849 EFFECT_MAX = RAMP 

850 SQUARE = 0x58 

851 TRIANGLE = 0x59 

852 SINE = 0x5A 

853 SAW_UP = 0x5B 

854 SAW_DOWN = 0x5C 

855 CUSTOM = 0x5D 

856 WAVEFORM_MIN = SQUARE 

857 WAVEFORM_MAX = CUSTOM 

858 GAIN = 0x60 

859 AUTOCENTER = 0x61 

860 MAX_EFFECTS = GAIN 

861 MAX = 0x7F 

862 CNT = MAX + 1 

863 

864 

865class UIForceFeedback(enum.IntEnum): 

866 pass 

867 

868 

869class Sound(enum.IntEnum): 

870 CLICK = 0x0 

871 BELL = 0x1 

872 TONE = 0x2 

873 MAX = 0x7 

874 CNT = MAX + 1 

875 

876 

877class Switch(enum.IntEnum): 

878 LID = 0x00 # set = lid shut 

879 TABLET_MODE = 0x01 # set = tablet mode 

880 HEADPHONE_INSERT = 0x02 # set = inserted 

881 RFKILL_ALL = 0x03 # rfkill master switch, type "any" 

882 RADIO = RFKILL_ALL # deprecated 

883 MICROPHONE_INSERT = 0x04 # set = inserted 

884 DOCK = 0x05 # set = pluggedcinto dock 

885 LINEOUT_INSERT = 0x06 # set = inserted 

886 JACK_PHYSICAL_INSERT = 0x07 # set = mechanical switch set 

887 VIDEOOUT_INSERT = 0x08 # set = inserted 

888 CAMERA_LENS_COVER = 0x09 # set = lens covered 

889 KEYPAD_SLIDE = 0x0A # set = keypad slide out 

890 FRONT_PROXIMITY = 0x0B # set = front proximity sensor active 

891 ROTATE_LOCK = 0x0C # set = rotate locked/disabled 

892 LINEIN_INSERT = 0x0D # set = inserted 

893 MUTE_DEVICE = 0x0E # set = device disabled 

894 PEN_INSERTED = 0x0F # set = pen inserted 

895 MACHINE_COVER = 0x10 # set = cover closed 

896 MAX = 0x10 

897 CNT = MAX + 1 

898 

899 

900class AutoRepeat(enum.IntEnum): 

901 DELAY = 0x0 

902 PERIOD = 0x1 

903 MAX = 0x1 

904 CNT = MAX + 1 

905 

906 

907class input_event(Struct): 

908 pass 

909 

910 

911input_event._fields_ = [("time", timeval), ("type", u16), ("code", u16), ("value", cint)] 

912 

913 

914class input_id(Struct): 

915 pass 

916 

917 

918input_id._fields_ = [("bustype", u16), ("vendor", u16), ("product", u16), ("version", u16)] 

919 

920 

921class input_absinfo(Struct): 

922 pass 

923 

924 

925input_absinfo._fields_ = [ 

926 ("value", cint), 

927 ("minimum", cint), 

928 ("maximum", cint), 

929 ("fuzz", cint), 

930 ("flat", cint), 

931 ("resolution", cint), 

932] 

933 

934 

935class input_keymap_entry(Struct): 

936 pass 

937 

938 

939input_keymap_entry._fields_ = [("flags", u8), ("len", u8), ("index", u16), ("keycode", cuint), ("scancode", cchar * 32)] 

940 

941 

942class input_mask(Struct): 

943 pass 

944 

945 

946input_mask._fields_ = [("type", cuint), ("codes_size", cuint), ("codes_ptr", culonglong)] 

947 

948 

949class ff_replay(Struct): 

950 pass 

951 

952 

953ff_replay._fields_ = [("length", u16), ("delay", u16)] 

954 

955 

956class ff_trigger(Struct): 

957 pass 

958 

959 

960ff_trigger._fields_ = [("button", u16), ("interval", u16)] 

961 

962 

963class ff_envelope(Struct): 

964 pass 

965 

966 

967ff_envelope._fields_ = [("attack_length", u16), ("attack_level", u16), ("fade_length", u16), ("fade_level", u16)] 

968 

969 

970class ff_constant_effect(Struct): 

971 pass 

972 

973 

974ff_constant_effect._fields_ = [("level", i16), ("envelope", ff_envelope)] 

975 

976 

977class ff_ramp_effect(Struct): 

978 pass 

979 

980 

981ff_ramp_effect._fields_ = [("start_level", i16), ("end_level", i16), ("envelope", ff_envelope)] 

982 

983 

984class ff_condition_effect(Struct): 

985 pass 

986 

987 

988ff_condition_effect._fields_ = [ 

989 ("right_saturation", u16), 

990 ("left_saturation", u16), 

991 ("right_coeff", i16), 

992 ("left_coeff", i16), 

993 ("deadband", u16), 

994 ("center", i16), 

995] 

996 

997 

998class ff_periodic_effect(Struct): 

999 pass 

1000 

1001 

1002ff_periodic_effect._fields_ = [ 

1003 ("waveform", u16), 

1004 ("period", u16), 

1005 ("magnitude", i16), 

1006 ("offset", i16), 

1007 ("phase", u16), 

1008 ("envelope", ff_envelope), 

1009 ("custom_len", cuint), 

1010 ("custom_data", POINTER(i16)), 

1011] 

1012 

1013 

1014class ff_rumble_effect(Struct): 

1015 pass 

1016 

1017 

1018ff_rumble_effect._fields_ = [("strong_magnitude", u16), ("weak_magnitude", u16)] 

1019 

1020 

1021class ff_effect(Struct): 

1022 class M1(Union): 

1023 pass 

1024 

1025 M1._fields_ = [ 

1026 ("constant", ff_constant_effect), 

1027 ("ramp", ff_ramp_effect), 

1028 ("periodic", ff_periodic_effect), 

1029 ("condition", ff_condition_effect * 2), 

1030 ("rumble", ff_rumble_effect), 

1031 ] 

1032 

1033 

1034ff_effect._fields_ = [ 

1035 ("type", u16), 

1036 ("id", i16), 

1037 ("direction", u16), 

1038 ("trigger", ff_trigger), 

1039 ("replay", ff_replay), 

1040 ("u", ff_effect.M1), 

1041] 

1042 

1043 

1044class uinput_ff_upload(Struct): 

1045 pass 

1046 

1047 

1048uinput_ff_upload._fields_ = [("request_id", cuint), ("retval", cint), ("effect", ff_effect), ("old", ff_effect)] 

1049 

1050 

1051class uinput_ff_erase(Struct): 

1052 pass 

1053 

1054 

1055uinput_ff_erase._fields_ = [("request_id", cuint), ("retval", cint), ("effect_id", cuint)] 

1056 

1057 

1058class uinput_setup(Struct): 

1059 pass 

1060 

1061 

1062uinput_setup._fields_ = [("id", input_id), ("name", cchar * 80), ("ff_effects_max", cuint)] 

1063 

1064 

1065class uinput_abs_setup(Struct): 

1066 pass 

1067 

1068 

1069uinput_abs_setup._fields_ = [("code", u16), ("absinfo", input_absinfo)] 

1070 

1071 

1072class uinput_user_dev(Struct): 

1073 pass 

1074 

1075 

1076uinput_user_dev._fields_ = [ 

1077 ("name", cchar * 80), 

1078 ("id", input_id), 

1079 ("ff_effects_max", cuint), 

1080 ("absmax", cint * 64), 

1081 ("absmin", cint * 64), 

1082 ("absfuzz", cint * 64), 

1083 ("absflat", cint * 64), 

1084] 

1085 

1086 

1087class UIOC(enum.IntEnum): 

1088 DEV_CREATE = _IO("U", 1) 

1089 DEV_DESTROY = _IO("U", 2) 

1090 DEV_SETUP = _IOW("U", 3, uinput_setup) 

1091 ABS_SETUP = _IOW("U", 4, uinput_abs_setup) 

1092 SET_EVBIT = _IOW("U", 100, cint) 

1093 SET_KEYBIT = _IOW("U", 101, cint) 

1094 SET_RELBIT = _IOW("U", 102, cint) 

1095 SET_ABSBIT = _IOW("U", 103, cint) 

1096 SET_MSCBIT = _IOW("U", 104, cint) 

1097 SET_LEDBIT = _IOW("U", 105, cint) 

1098 SET_SNDBIT = _IOW("U", 106, cint) 

1099 SET_FFBIT = _IOW("U", 107, cint) 

1100 SET_PHYS = _IOW("U", 108, ccharp) 

1101 SET_SWBIT = _IOW("U", 109, cint) 

1102 SET_PROPBIT = _IOW("U", 110, cint) 

1103 BEGIN_FF_UPLOAD = _IOWR("U", 200, uinput_ff_upload) 

1104 END_FF_UPLOAD = _IOW("U", 201, uinput_ff_upload) 

1105 BEGIN_FF_ERASE = _IOWR("U", 202, uinput_ff_erase) 

1106 END_FF_ERASE = _IOW("U", 203, uinput_ff_erase) 

1107 GET_VERSION = _IOR("U", 45, cuint)