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 #include "ultrainputreport.h"
22 /* Identifies mouse and keyboard activity which is specified by the firmware to
23 * the host using the cmsimpleinput protocol. @ingroup coretypes
25 enum ultra_inputaction {
27 inputaction_xy_motion = 1, /* only motion; arg1=x, arg2=y */
28 inputaction_mouse_button_down = 2, /* arg1: 1=left,2=center,3=right */
29 inputaction_mouse_button_up = 3, /* arg1: 1=left,2=center,3=right */
30 inputaction_mouse_button_click = 4, /* arg1: 1=left,2=center,3=right */
31 inputaction_mouse_button_dclick = 5, /* arg1: 1=left,2=center,
33 inputaction_wheel_rotate_away = 6, /* arg1: wheel rotation away from
35 inputaction_wheel_rotate_toward = 7, /* arg1: wheel rotation toward
37 inputaction_set_max_xy = 8, /* set screen maxXY; arg1=x, arg2=y */
38 inputaction_key_down = 64, /* arg1: scancode, as follows:
39 If arg1 <= 0xff, it's a 1-byte
40 scancode and arg1 is that scancode.
41 If arg1 > 0xff, it's a 2-byte
42 scanecode, with the 1st byte in the
43 low 8 bits, and the 2nd byte in the
44 high 8 bits. E.g., the right ALT key
45 would appear as x'38e0'. */
46 inputaction_key_up = 65, /* arg1: scancode (in same format as
47 inputaction_keyDown) */
48 inputaction_set_locking_key_state = 66,
49 /* arg1: scancode (in same format
50 as inputaction_keyDown);
51 MUST refer to one of the
52 locking keys, like capslock,
53 numlock, or scrolllock
54 arg2: 1 iff locking key should be
55 in the LOCKED position
56 (e.g., light is ON) */
57 inputaction_key_down_up = 67, /* arg1: scancode (in same format
58 as inputaction_keyDown) */
62 struct ultra_inputactivity {
69 struct ultra_inputreport {
71 struct ultra_inputactivity activity;