ARM: cpu topology: Add debugfs interface for cpu_power
[cmplus.git] / include / linux / keychord.h
blob856a5850217b24442901f2f1c8799bf158b9d007
1 /*
2 * Key chord input driver
4 * Copyright (C) 2008 Google, Inc.
5 * Author: Mike Lockwood <lockwood@android.com>
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
18 #ifndef __LINUX_KEYCHORD_H_
19 #define __LINUX_KEYCHORD_H_
21 #include <linux/input.h>
23 #define KEYCHORD_VERSION 1
26 * One or more input_keychord structs are written to /dev/keychord
27 * at once to specify the list of keychords to monitor.
28 * Reading /dev/keychord returns the id of a keychord when the
29 * keychord combination is pressed. A keychord is signalled when
30 * all of the keys in the keycode list are in the pressed state.
31 * The order in which the keys are pressed does not matter.
32 * The keychord will not be signalled if keys not in the keycode
33 * list are pressed.
34 * Keychords will not be signalled on key release events.
36 struct input_keychord {
37 /* should be KEYCHORD_VERSION */
38 __u16 version;
40 * client specified ID, returned from read()
41 * when this keychord is pressed.
43 __u16 id;
45 /* number of keycodes in this keychord */
46 __u16 count;
48 /* variable length array of keycodes */
49 __u16 keycodes[];
52 #endif /* __LINUX_KEYCHORD_H_ */