1 /* Copyright (C) 2010 - 2015 UNISYS CORPORATION
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.
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
15 #ifndef __SPAR_ULTRAINPUTREPORT_H__
16 #define __SPAR_ULTRAINPUTREPORT_H__
18 #include <linux/types.h>
20 /* Identifies mouse and keyboard activity which is specified by the firmware to
21 * the host using the cmsimpleinput protocol. @ingroup coretypes
23 enum ultra_inputaction {
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,
32 inputaction_wheel_rotate_away = 6, /* arg1: wheel rotation away from
35 inputaction_wheel_rotate_toward = 7, /* arg1: wheel rotation toward
38 inputaction_set_max_xy = 8, /* set screen maxXY; arg1=x, arg2=y */
39 inputaction_key_down = 64, /* arg1: scancode, as follows:
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'.
48 inputaction_key_up = 65, /* arg1: scancode (in same format as
49 * inputaction_keyDown)
51 inputaction_set_locking_key_state = 66,
52 /* arg1: scancode (in same format
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
61 inputaction_key_down_up = 67, /* arg1: scancode (in same format
62 * as inputaction_keyDown)
67 struct ultra_inputactivity {
74 struct ultra_inputreport {
76 struct ultra_inputactivity activity;