Commit | Line | Data |
---|---|---|
2e192025 EA |
1 | /* Copyright (C) 2010 - 2015 UNISYS CORPORATION |
2 | * All rights reserved. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify it | |
5 | * under the terms and conditions of the GNU General Public License, | |
6 | * version 2, as published by the Free Software Foundation. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, but | |
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | |
11 | * NON INFRINGEMENT. See the GNU General Public License for more | |
12 | * details. | |
13 | */ | |
14 | ||
15 | #ifndef __SPAR_ULTRAINPUTREPORT_H__ | |
16 | #define __SPAR_ULTRAINPUTREPORT_H__ | |
17 | ||
18 | #include <linux/types.h> | |
19 | ||
2e192025 EA |
20 | /* Identifies mouse and keyboard activity which is specified by the firmware to |
21 | * the host using the cmsimpleinput protocol. @ingroup coretypes | |
22 | */ | |
23 | enum ultra_inputaction { | |
24 | inputaction_none = 0, | |
25 | inputaction_xy_motion = 1, /* only motion; arg1=x, arg2=y */ | |
26 | inputaction_mouse_button_down = 2, /* arg1: 1=left,2=center,3=right */ | |
27 | inputaction_mouse_button_up = 3, /* arg1: 1=left,2=center,3=right */ | |
28 | inputaction_mouse_button_click = 4, /* arg1: 1=left,2=center,3=right */ | |
29 | inputaction_mouse_button_dclick = 5, /* arg1: 1=left,2=center, | |
5d5a0bd9 EA |
30 | * 3=right |
31 | */ | |
2e192025 | 32 | inputaction_wheel_rotate_away = 6, /* arg1: wheel rotation away from |
5d5a0bd9 EA |
33 | * user |
34 | */ | |
2e192025 | 35 | inputaction_wheel_rotate_toward = 7, /* arg1: wheel rotation toward |
5d5a0bd9 EA |
36 | * user |
37 | */ | |
2e192025 EA |
38 | inputaction_set_max_xy = 8, /* set screen maxXY; arg1=x, arg2=y */ |
39 | inputaction_key_down = 64, /* arg1: scancode, as follows: | |
5d5a0bd9 EA |
40 | * If arg1 <= 0xff, it's a 1-byte |
41 | * scancode and arg1 is that scancode. | |
42 | * If arg1 > 0xff, it's a 2-byte | |
43 | * scanecode, with the 1st byte in the | |
44 | * low 8 bits, and the 2nd byte in the | |
45 | * high 8 bits. E.g., the right ALT key | |
46 | * would appear as x'38e0'. | |
47 | */ | |
2e192025 | 48 | inputaction_key_up = 65, /* arg1: scancode (in same format as |
5d5a0bd9 EA |
49 | * inputaction_keyDown) |
50 | */ | |
2e192025 EA |
51 | inputaction_set_locking_key_state = 66, |
52 | /* arg1: scancode (in same format | |
5d5a0bd9 EA |
53 | * as inputaction_keyDown); |
54 | * MUST refer to one of the | |
55 | * locking keys, like capslock, | |
56 | * numlock, or scrolllock | |
57 | * arg2: 1 iff locking key should be | |
58 | * in the LOCKED position | |
59 | * (e.g., light is ON) | |
60 | */ | |
2e192025 | 61 | inputaction_key_down_up = 67, /* arg1: scancode (in same format |
5d5a0bd9 EA |
62 | * as inputaction_keyDown) |
63 | */ | |
2e192025 EA |
64 | inputaction_last |
65 | }; | |
66 | ||
67 | struct ultra_inputactivity { | |
68 | u16 action; | |
69 | u16 arg1; | |
70 | u16 arg2; | |
71 | u16 arg3; | |
72 | } __packed; | |
73 | ||
74 | struct ultra_inputreport { | |
75 | u64 seq_no; | |
76 | struct ultra_inputactivity activity; | |
77 | } __packed; | |
78 | ||
79 | #endif |