2 * Copyright © 2013 Red Hat, Inc.
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
28 #include "litest-int.h"
30 static void litest_keyboard_setup(void)
32 struct litest_device *d = litest_create_device(LITEST_KEYBOARD);
33 litest_set_current_device(d);
36 static struct input_id input_id = {
42 static int events[] = {
56 EV_KEY, KEY_BACKSPACE,
68 EV_KEY, KEY_LEFTBRACE,
69 EV_KEY, KEY_RIGHTBRACE,
81 EV_KEY, KEY_SEMICOLON,
82 EV_KEY, KEY_APOSTROPHE,
84 EV_KEY, KEY_LEFTSHIFT,
85 EV_KEY, KEY_BACKSLASH,
96 EV_KEY, KEY_RIGHTSHIFT,
97 EV_KEY, KEY_KPASTERISK,
100 EV_KEY, KEY_CAPSLOCK,
112 EV_KEY, KEY_SCROLLLOCK,
126 EV_KEY, KEY_ZENKAKUHANKAKU,
131 EV_KEY, KEY_KATAKANA,
132 EV_KEY, KEY_HIRAGANA,
134 EV_KEY, KEY_KATAKANAHIRAGANA,
135 EV_KEY, KEY_MUHENKAN,
136 EV_KEY, KEY_KPJPCOMMA,
138 EV_KEY, KEY_RIGHTCTRL,
141 EV_KEY, KEY_RIGHTALT,
142 EV_KEY, KEY_LINEFEED,
150 EV_KEY, KEY_PAGEDOWN,
155 EV_KEY, KEY_VOLUMEDOWN,
156 EV_KEY, KEY_VOLUMEUP,
159 EV_KEY, KEY_KPPLUSMINUS,
161 /* EV_KEY, KEY_SCALE, */
166 EV_KEY, KEY_LEFTMETA,
167 EV_KEY, KEY_RIGHTMETA,
176 EV_KEY, KEY_SCREENLOCK,
177 EV_KEY, KEY_DIRECTION,
178 EV_KEY, KEY_CYCLEWINDOWS,
180 EV_KEY, KEY_BOOKMARKS,
181 EV_KEY, KEY_COMPUTER,
184 EV_KEY, KEY_NEXTSONG,
185 EV_KEY, KEY_PLAYPAUSE,
186 EV_KEY, KEY_PREVIOUSSONG,
188 EV_KEY, KEY_HOMEPAGE,
198 struct litest_test_device litest_keyboard_device = {
199 .type = LITEST_KEYBOARD,
200 .features = LITEST_KEYS,
201 .shortname = "default keyboard",
202 .setup = litest_keyboard_setup,
205 .name = "AT Translated Set 2 keyboard",