/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ /* * Input event codes * * *** IMPORTANT *** * This file is not only included from C-code but also from devicetree source * files. As such this file MUST only contain comments and defines. * * Copyright (c) 1999-2002 Vojtech Pavlik * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation.
*/ #ifndef _UAPI_INPUT_EVENT_CODES_H #define _UAPI_INPUT_EVENT_CODES_H
/* * Device properties and quirks
*/
#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
/* * Keys and buttons * * Most of the keys/buttons are modeled after USB HUT 1.12 * (see http://www.usb.org/developers/hidpage). * Abbreviations in the comments: * AC - Application Control * AL - Application Launch Button * SC - System Control
*/
#define KEY_VIDEO_NEXT 241 /* drive next video source */ #define KEY_VIDEO_PREV 242 /* drive previous video source */ #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ #define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual brightness control is off,
rely on ambient */ #define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO #define KEY_DISPLAY_OFF 245 /* display device to off state */
#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ #define KEY_WIMAX KEY_WWAN #define KEY_RFKILL 247 /* Key that controls all radios */
#define KEY_MICMUTE 248 /* Mute / unmute the microphone */
/* Code 255 is reserved for special needs of AT keyboard driver */
#define KEY_ATTENDANT_ON 0x21b #define KEY_ATTENDANT_OFF 0x21c #define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ #define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */
#define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */ /* Show Top Menu of the Media (e.g. DVD) */ #define KEY_MEDIA_TOP_MENU 0x26b #define KEY_NUMERIC_11 0x26c #define KEY_NUMERIC_12 0x26d /* * Toggle Audio Description: refers to an audio service that helps blind and * visually impaired consumers understand the action in a program. Note: in * some countries this is referred to as "Video Description".
*/ #define KEY_AUDIO_DESC 0x26e #define KEY_3D_MODE 0x26f #define KEY_NEXT_FAVORITE 0x270 #define KEY_STOP_RECORD 0x271 #define KEY_PAUSE_RECORD 0x272 #define KEY_VOD 0x273 /* Video on Demand */ #define KEY_UNMUTE 0x274 #define KEY_FASTREVERSE 0x275 #define KEY_SLOWREVERSE 0x276 /* * Control a data application associated with the currently viewed channel, * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.)
*/ #define KEY_DATA 0x277 #define KEY_ONSCREEN_KEYBOARD 0x278 /* Electronic privacy screen control */ #define KEY_PRIVACY_SCREEN_TOGGLE 0x279
/* Select an area of screen to be copied */ #define KEY_SELECTIVE_SCREENSHOT 0x27a
/* Move the focus to the next or previous user controllable element within a UI container */ #define KEY_NEXT_ELEMENT 0x27b #define KEY_PREVIOUS_ELEMENT 0x27c
/* * Some keyboards have keys which do not have a defined meaning, these keys * are intended to be programmed / bound to macros by the user. For most * keyboards with these macro-keys the key-sequence to inject, or action to * take, is all handled by software on the host side. So from the kernel's * point of view these are just normal keys. * * The KEY_MACRO# codes below are intended for such keys, which may be labeled * e.g. G1-G18, or S1 - S30. The KEY_MACRO# codes MUST NOT be used for keys * where the marking on the key does indicate a defined meaning / purpose. * * The KEY_MACRO# codes MUST also NOT be used as fallback for when no existing * KEY_FOO define matches the marking / purpose. In this case a new KEY_FOO * define MUST be added.
*/ #define KEY_MACRO1 0x290 #define KEY_MACRO2 0x291 #define KEY_MACRO3 0x292 #define KEY_MACRO4 0x293 #define KEY_MACRO5 0x294 #define KEY_MACRO6 0x295 #define KEY_MACRO7 0x296 #define KEY_MACRO8 0x297 #define KEY_MACRO9 0x298 #define KEY_MACRO10 0x299 #define KEY_MACRO11 0x29a #define KEY_MACRO12 0x29b #define KEY_MACRO13 0x29c #define KEY_MACRO14 0x29d #define KEY_MACRO15 0x29e #define KEY_MACRO16 0x29f #define KEY_MACRO17 0x2a0 #define KEY_MACRO18 0x2a1 #define KEY_MACRO19 0x2a2 #define KEY_MACRO20 0x2a3 #define KEY_MACRO21 0x2a4 #define KEY_MACRO22 0x2a5 #define KEY_MACRO23 0x2a6 #define KEY_MACRO24 0x2a7 #define KEY_MACRO25 0x2a8 #define KEY_MACRO26 0x2a9 #define KEY_MACRO27 0x2aa #define KEY_MACRO28 0x2ab #define KEY_MACRO29 0x2ac #define KEY_MACRO30 0x2ad
/* * Some keyboards with the macro-keys described above have some extra keys * for controlling the host-side software responsible for the macro handling: * -A macro recording start/stop key. Note that not all keyboards which emit * KEY_MACRO_RECORD_START will also emit KEY_MACRO_RECORD_STOP if * KEY_MACRO_RECORD_STOP is not advertised, then KEY_MACRO_RECORD_START * should be interpreted as a recording start/stop toggle; * -Keys for switching between different macro (pre)sets, either a key for * cycling through the configured presets or keys to directly select a preset.
*/ #define KEY_MACRO_RECORD_START 0x2b0 #define KEY_MACRO_RECORD_STOP 0x2b1 #define KEY_MACRO_PRESET_CYCLE 0x2b2 #define KEY_MACRO_PRESET1 0x2b3 #define KEY_MACRO_PRESET2 0x2b4 #define KEY_MACRO_PRESET3 0x2b5
/* * Some keyboards have a buildin LCD panel where the contents are controlled * by the host. Often these have a number of keys directly below the LCD * intended for controlling a menu shown on the LCD. These keys often don't * have any labeling so we just name them KEY_KBD_LCD_MENU#
*/ #define KEY_KBD_LCD_MENU1 0x2b8 #define KEY_KBD_LCD_MENU2 0x2b9 #define KEY_KBD_LCD_MENU3 0x2ba #define KEY_KBD_LCD_MENU4 0x2bb #define KEY_KBD_LCD_MENU5 0x2bc
/* We avoid low common keys in module aliases so they don't get huge. */ #define KEY_MIN_INTERESTING KEY_MUTE #define KEY_MAX 0x2ff #define KEY_CNT (KEY_MAX+1)
/* * Relative axes
*/
#define REL_X 0x00 #define REL_Y 0x01 #define REL_Z 0x02 #define REL_RX 0x03 #define REL_RY 0x04 #define REL_RZ 0x05 #define REL_HWHEEL 0x06 #define REL_DIAL 0x07 #define REL_WHEEL 0x08 #define REL_MISC 0x09 /* * 0x0a is reserved and should not be used in input drivers. * It was used by HID as REL_MISC+1 and userspace needs to detect if * the next REL_* event is correct or is just REL_MISC + n. * We define here REL_RESERVED so userspace can rely on it and detect * the situation described above.
*/ #define REL_RESERVED 0x0a #define REL_WHEEL_HI_RES 0x0b #define REL_HWHEEL_HI_RES 0x0c #define REL_MAX 0x0f #define REL_CNT (REL_MAX+1)
/* * 0x2e is reserved and should not be used in input drivers. * It was used by HID as ABS_MISC+6 and userspace needs to detect if * the next ABS_* event is correct or is just ABS_MISC + n. * We define here ABS_RESERVED so userspace can rely on it and detect * the situation described above.
*/ #define ABS_RESERVED 0x2e
#define ABS_MT_SLOT 0x2f /* MT slot being modified */ #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ #define ABS_MT_POSITION_X 0x35 /* Center X touch position */ #define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */
#define ABS_MAX 0x3f #define ABS_CNT (ABS_MAX+1)
/* * Switch events
*/
#define SW_LID 0x00 /* set = lid shut */ #define SW_TABLET_MODE 0x01 /* set = tablet mode */ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
set = radio enabled */ #define SW_RADIO SW_RFKILL_ALL /* deprecated */ #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ #define SW_DOCK 0x05 /* set = plugged into dock */ #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ #define SW_LINEIN_INSERT 0x0d /* set = inserted */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_MACHINE_COVER 0x10 /* set = cover closed */ #define SW_USB_INSERT 0x11 /* set = USB audio device connected */ #define SW_MAX 0x11 #define SW_CNT (SW_MAX+1)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.