RXTVTV4*35+1*164条线是什么牌子线?

【蕊希】 《1分之二》原《一个人听》音乐 - 歌单 - 网易云音乐
【蕊希】 《1分之二》原《一个人听》音乐
各位好,我是蕊希,花蕊的蕊,希望的希。。。
播放:8932次
喜欢这个歌单的人
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:李志的港岛妹妹尤诗怡喜欢的音乐 - 歌单 - 网易云音乐
李志的港岛妹妹尤诗怡喜欢的音乐
播放:5706次
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:【DIY老司机】没有更高端了 X299+酷睿i9+GTX1080Ti海神
  【PConline 直播】最近Intel刚发布了最新的至尊级平台X299+新的酷睿i9 CPU,从名称上看就知道定位是凌驾于酷睿i7之上的型号了,最高端的i9-7980XE惊人地达到了18核36线程(上代旗舰也只有10核20线程),核心数量飙升,多线程能力也会达到新的高度。  虽然评测文章已经面面俱到了,但还是很有必要补一次直播评测的,那就赶紧来我们直播间吧。我们豪华的测试装备&&  Intel为了应对AMD最近很强势的锐龙Ryzen,赶紧推出了全新的一个至尊级的i9 CPU,最高规格型号为18核36线程,是的你没看错!!支持最新的AVX-512指令集、Turbo Boost 3.0技术、全新的LGA2066接口、44条PCIe 3.0通道、4通道DDR4-2666内存、完全开放超频、傲腾内存,等等一系列最新最强的技术都会率先应用于此。华硕 PRIME X299-DELUXE  华硕PRIME系列的顶级存在,支持最新酷睿i9 CPU、主板中央集成OLED显示屏、傲腾内存以及更多的PCIe 3.0通道数和扩展接口。华硕 ROG-海神-GTX1080Ti  市面上最贵的GTX1080Ti显卡,水冷与风冷的完美结合,ROG 海神系列显卡一向都是显卡巅峰的存在。&主播:兽王&伊一  大家快点来送礼物、发弹幕、加Q群呀。&直播礼物 先到先得:ROG USB 3.0 U盘&纪念徽章  想要的就关注我们直播间,发弹幕抽奖吧!&直播平台直播地址开播时间:日下午4点&直播即将开始&&&  感兴趣的朋友请先战略性马克!还可以通过扫码添加我们的直播QQ群,直播开始前管理员都会在群里准时通知大家!&一群已满请加二群,请加二群!请加二群!请加二群!  想和主播进行互动吗?届时请大伙儿访问我们的YY、斗鱼、熊猫或全民TV直播间给主播留言吧!也可以加入我们的PConline直播QQ交流群:(二群!!!一群已满)和我们深入交流,知无不言言无不尽,6月21日16:00我们不见不散。&直播平台直播地址开播时间:日下午4点&末了,附上前几期期直播回放的链接:DIY老司机:怎么装一台又酷又小巧的主机DIY老司机:直播逛一年一度的科技大会DIY老司机:3K预算的主机能配GT1030显卡?DIY老司机:都说SSD不怕摔?使劲摔呢?DIY老司机:这几款奇葩鼠标能预防鼠标手直播解密:RX480&RX580交火如何?DIY老司机:新出炉的锐龙Ryzen 5 CPU直播DIY老司机:速速围观!老黄要教蛋妹DIY耳机啦DIY老司机:喜大普奔!给RX470D开个核秒变RX470DIY老司机:虐待热销款苹果数据线:谁还能坚挺?DIY老司机:11.11买电商主机要注意什么?DIY老司机:三台高端酷炫主机:除了逼格还有什么?DIY老司机:据说还有比GTX1050Ti更甜的神秘显卡DIY老司机:真&千元甜点显卡降临!1050Ti首发直播开箱DIY老司机:&该如何选择快充配件?&DIY老司机:几十块和几千块的耳机有差吗?DIY老司机:变废为宝!家里的老电脑还能干啥?DIY老司机:变废为宝!家里的老电脑还能干啥?DIY老司机:淘宝几十块钱的山寨SSD能用?我DIY一个DIY老司机:怎么把00后升级改造为10后?你们说很想看直播CPU开盖 所以我搞了一颗回来老司机直播:教你打造一把全宇宙独一无二的键盘!兽王教你RX470要怎么玩:你们最想要的千元级显卡?不懂你们玩外设的 女主播:20元与1200元鼠标没差?妹纸和你聊情怀!Show U经典的NV 6字辈显卡你们最想看的RX480交火,蛋蛋妹实测哦!PConline直播:美女主播装机の初体验!女主播开车你能错过?什么显卡能撸爽守望先锋PConline直播:畅玩HTC Vive要什么配置?PConline直播:今晚我们聊聊GTX1080!PConline直播:如何打造一台全白PC主机?PConline直播:我们打算装一台非常牛X的主机!PConline直播:鼠标连点不要&方&!直播教你换微动PConline直播:换个硅脂温度骤降10度真不真?PConline直播:今晚 我们聊聊机械键盘!PConline直播:华硕猛禽980Ti水冷版现场实测!PConline直播:电商整机不能说的秘密!&
DIY硬件图赏
DIY论坛帖子排行
最新资讯离线随时看
聊天吐槽赢奖品sponsored links
Android KeyCode 列表
一.KEYCODE列表
KEYCODE_CALL
KEYCODE_ENDCALL
KEYCODE_HOME
KEYCODE_MENU
KEYCODE_BACK
KEYCODE_SRCH
KEYCODE_CAMERA
KEYCODE_FOCUS
拍照对焦键
KEYCODE_POWER
KEYCODE_NOTIFICATION
KEYCODE_MUTE
话筒静音键
KEYCODE_VOLUME_MUTE
扬声器静音键
KEYCODE_VOLUME_UP
音量增加键
KEYCODE_VOLUME_DOWN
音量减小键
KEYCODE_ENTER
KEYCODE_ESCAPE
KEYCODE_DPAD_CENTER
KEYCODE_DPAD_UP
导航键 向上
KEYCODE_DPAD_DOWN
导航键 向下
KEYCODE_DPAD_LEFT
导航键 向左
KEYCODE_DPAD_RIGHT
导航键 向右
KEYCODE_MOVE_HOME
光标到开始键
KEYCODE_MOVE_END
光标移动到末尾键
KEYCODE_PAGE_UP
向上翻页键
KEYCODE_PAGE_DOWN
向下翻页键
KEYCODE_DEL
KEYCODE_FORWARD_DEL
KEYCODE_SERT
KEYCODE_TAB
KEYCODE_NUM_LOCK
KEYCODE_CAPS_LOCK
大写锁定键
KEYCODE_BREAK
Break/Pause键
KEYCODE_SCROLL_LOCK
滚动锁定键
KEYCODE_ZOOM_IN
KEYCODE_ZOOM_OUT
KEYCODE_ALT_LEFT
KEYCODE_ALT_RIGHT
KEYCODE_CTRL_LEFT
Control+Left
KEYCODE_CTRL_RIGHT
Control+Right
KEYCODE_SHIFT_LEFT
Shift+Left
KEYCODE_SHIFT_RIGHT
Shift+Right
KEYCODE_PLUS
KEYCODE_MINUS
KEYCODE_STAR
KEYCODE_SLASH
KEYCODE_EQUALS
KEYCODE_AT
KEYCODE_POUND
KEYCODE_APTROPHE
按键''' (单引号)
KEYCODE_BACKSLASH
KEYCODE_COMMA
KEYCODE_PERIOD
KEYCODE_LEFT_BRACKET
KEYCODE_RIGHT_BRACKET
KEYCODE_ICOLON
KEYCODE_GRAVE
KEYCODE_SPACE
KEYCODE_NUMPAD_0
小键盘按键'0'
KEYCODE_NUMPAD_1
小键盘按键'1'
KEYCODE_NUMPAD_2
小键盘按键'2'
KEYCODE_NUMPAD_3
小键盘按键'3'
KEYCODE_NUMPAD_4
小键盘按键'4'
KEYCODE_NUMPAD_5
小键盘按键'5'
KEYCODE_NUMPAD_6
小键盘按键'6'
KEYCODE_NUMPAD_7
小键盘按键'7'
KEYCODE_NUMPAD_8
小键盘按键'8'
KEYCODE_NUMPAD_9
小键盘按键'9'
KEYCODE_NUMPAD_ADD
小键盘按键'+'
KEYCODE_NUMPAD_SUBTRACT
小键盘按键'-'
KEYCODE_NUMPAD_MULTLY
小键盘按键'*'
KEYCODE_NUMPAD_DIV
小键盘按键'/'
KEYCODE_NUMPAD_EQUALS
小键盘按键'='
KEYCODE_NUMPAD_COMMA
小键盘按键','
KEYCODE_NUMPAD_DOT
小键盘按键'.'
KEYCODE_NUMPAD_LEFT_PAREN
小键盘按键'('
KEYCODE_NUMPAD_RIGHT_PAREN
小键盘按键')'
KEYCODE_NUMPAD_ENTER
小键盘按键回车
KEYCODE_F1
KEYCODE_F2
KEYCODE_F3
KEYCODE_F4
KEYCODE_F5
KEYCODE_F6
KEYCODE_F7
KEYCODE_F8
KEYCODE_F9
KEYCODE_F10
KEYCODE_F11
KEYCODE_F12
KEYCODE_IA_PLAY
多媒体键 播放
KEYCODE_MEDIA_STOP
多媒体键 停止
KEYCODE_MEDIA_PAUSE
多媒体键 暂停
KEYCODE_MEDIA_PLAY_PAUSE
多媒体键 播放/暂停
KEYCODE_MEDIA_FAST_FORWARD
多媒体键 快进
KEYCODE_MEDIA_REWIND
多媒体键 快退
KEYCODE_MEDIA_NEXT
多媒体键 下一首
KEYCODE_MEDIA_EVIOUS
多媒体键 上一首
KEYCODE_MEDIA_CLOSE
多媒体键 关闭
KEYCODE_MEDIA_EJECT
多媒体键 弹出
KEYCODE_MEDIA_RECORD
多媒体键 录音
KEYCODE_BUTTON_1
通用手柄按钮#1
KEYCODE_BUTTON_2
通用游戏手柄按钮 #2
KEYCODE_BUTTON_3
通用游戏手柄按钮 #3
KEYCODE_BUTTON_4
通用游戏手柄按钮 #4
KEYCODE_BUTTON_5
通用游戏手柄按钮 #5
KEYCODE_BUTTON_6
通用游戏手柄按钮 #6
KEYCODE_BUTTON_7
通用游戏手柄按钮 #7
KEYCODE_BUTTON_8
通用游戏手柄按钮 #8
KEYCODE_BUTTON_9
通用游戏手柄按钮 #9
KEYCODE_BUTTON_10
通用游戏手柄按钮 #10
KEYCODE_BUTTON_11
通用游戏手柄按钮 #11
KEYCODE_BUTTON_12
通用游戏手柄按钮 #12
KEYCODE_BUTTON_13
通用游戏手柄按钮 #13
KEYCODE_BUTTON_14
通用游戏手柄按钮 #14
KEYCODE_BUTTON_15
通用游戏手柄按钮 #15
KEYCODE_BUTTON_16
通用游戏手柄按钮 #16
KEYCODE_BUTTON_A
游戏手柄按钮 A
KEYCODE_BUTTON_B
游戏手柄按钮 B
KEYCODE_BUTTON_C
游戏手柄按钮 C
KEYCODE_BUTTON_X
游戏手柄按钮 X
KEYCODE_BUTTON_Y
游戏手柄按钮 Y
KEYCODE_BUTTON_Z
游戏手柄按钮 Z
KEYCODE_BUTTON_L1
游戏手柄按钮 L1
KEYCODE_BUTTON_L2
游戏手柄按钮 L2
KEYCODE_BUTTON_R1
游戏手柄按钮 R1
KEYCODE_BUTTON_R2
游戏手柄按钮 R2
KEYCODE_BUTTON_MODE
游戏手柄按钮 Mode
KEYCODE_BUTTON_SELECT
游戏手柄按钮 Select
KEYCODE_BUTTON_START
游戏手柄按钮 Start
KEYCODE_BUTTON_THUMBL
Left Thumb Button
KEYCODE_BUTTON_THUMBR
Right Thumb Button
KEYCODE_NUM
按键Number modifier
KEYCODE_INFO
KEYCODE__SWCH
按键App switch
KEYCODE_BOOKMARK
按键Bookmark
KEYCODE_AVR_INPUT
按键A/V Receiver input
KEYCODE_AVR_POWER
按键A/V Receiver power
KEYCODE_CAPTIONS
按键Toggle captions
KEYCODE_CHANNEL_DOWN
按键Channel down
KEYCODE_CHANNEL_UP
按键Channel up
KEYCODE_CLEAR
KEYCODE_DVR
KEYCODE_ENVELOPE
按键Envelope special function
KEYCODE_ELORER
按键Explorer special function
KEYCODE_FORWARD
按键Forward
KEYCODE_FORWARD_DEL
按键Forward Delete
KEYCODE_FUNCTION
按键Function modifier
KEYCODE_GDE
KEYCODE_HEADSETHOOK
按键Headset Hook
KEYCODE_META_LEFT
按键Left Meta modifier
KEYCODE_META_RIGHT
按键Right Meta modifier
KEYCODE_PICTSYMBOLS
按键Picture Symbols modifier
KEYCODE_PROG_BL
按键Blue &programmable&
KEYCODE_PROG_GREEN
按键Green &programmable&
KEYCODE_PROG_RED
按键Red &programmable&
KEYCODE_PROG_YELLOW
按键Yellow &programmable&
KEYCODE_SETTINGS
按键Settings
KEYCODE_SOFT_LEFT
按键Soft Left
KEYCODE_SOFT_RIGHT
按键Soft Right
KEYCODE_STB_INPUT
按键Set-top-box input
KEYCODE_STB_POWER
按键Set-top-box power
KEYCODE_SWITCH_CHARSET
按键Switch Charset modifier
KEYCODE_SYM
按键Symbol modifier
KEYCODE_SYSRQ
按键System Request / Print Screen
KEYCODE_TV
KEYCODE_TV_INPUT
按键TV input
KEYCODE_TV_POWER
按键TV power
KEYCODE_WINDOW
按键Window
KEYCODE_UNKNOWN
二.底层代码实现
frameworks/base/data/keyboards/Generic.kl
# Copyright (C) 2010 The Android Open Source Project
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generic key layout file for full alphabetic US English PC style external keyboards.
# This file is intentionally very generic and is intended to support a broad rang of keyboards.
# Do not edit the generic key layout to support instead, create
# a new key layout file with the required keyboard configuration.
LEFT_BRACKET
RIGHT_BRACKET
APOSTROPHE
SHIFT_LEFT
SHIFT_RIGHT
NUMPAD_MULTIPLY
SCROLL_LOCK
NUMPAD_SUBTRACT
NUMPAD_ADD
NUMPAD_DOT
# key 84 (undefined)
ZENKAKU_HANKAKU
# key 90 "KEY_KATAKANA"
# key 91 "KEY_HIRAGANA"
KATAKANA_HIRAGANA
NUMPAD_COMMA
NUMPAD_ENTER
CTRL_RIGHT
NUMPAD_DIVIDE
# key 101 "KEY_LINEFEED"
DPAD_RIGHT
FORWARD_DEL
# key 112 "KEY_MACRO"
VOLUME_MUTE
VOLUME_DOWN
NUMPAD_EQUALS
# key 118 "KEY_KPPLUSMINUS"
# key 120 (undefined)
NUMPAD_COMMA
META_RIGHT
WAKE_DROPPED
MEDIA_STOP
# key 129 "KEY_AGAIN"
# key 130 "KEY_PROPS"
# key 131 "KEY_UNDO"
# key 132 "KEY_FRONT"
# key 133 "KEY_COPY"
# key 134 "KEY_OPEN"
# key 135 "KEY_PASTE"
# key 136 "KEY_FIND"
# key 137 "KEY_CUT"
# key 138 "KEY_HELP"
WAKE_DROPPED
CALCULATOR
# key 141 "KEY_SETUP"
# key 144 "KEY_FILE"
# key 145 "KEY_SENDFILE"
# key 146 "KEY_DELETEFILE"
# key 147 "KEY_XFER"
# key 148 "KEY_PROG1"
# key 149 "KEY_PROG2"
# key 151 "KEY_MSDOS"
# key 153 "KEY_DIRECTION"
# key 154 "KEY_CYCLEWINDOWS"
# key 157 "KEY_COMPUTER"
WAKE_DROPPED
MEDIA_CLOSE
MEDIA_EJECT
MEDIA_EJECT
MEDIA_NEXT
MEDIA_PLAY_PAUSE
MEDIA_PREVIOUS
MEDIA_STOP
MEDIA_RECORD
MEDIA_REWIND
# key 170 "KEY_ISO"
# key 173 "KEY_REFRESH"
# key 174 "KEY_EXIT"
# key 175 "KEY_MOVE"
# key 176 "KEY_EDIT"
NUMPAD_LEFT_PAREN
NUMPAD_RIGHT_PAREN
# key 181 "KEY_NEW"
# key 182 "KEY_REDO"
# key 195 (undefined)
# key 196 (undefined)
# key 197 (undefined)
# key 198 (undefined)
# key 199 (undefined)
MEDIA_PLAY
MEDIA_PAUSE
# key 202 "KEY_PROG3"
# key 203 "KEY_PROG4"
# key 204 (undefined)
# key 205 "KEY_SUSPEND"
# key 206 "KEY_CLOSE"
MEDIA_PLAY
MEDIA_FAST_FORWARD
# key 209 "KEY_BASSBOOST"
# key 210 "KEY_PRINT"
# key 211 "KEY_HP"
# key 214 "KEY_QUESTION"
# key 216 "KEY_CHAT"
# key 218 "KEY_CONNECT"
# key 219 "KEY_FINANCE"
# key 220 "KEY_SPORT"
# key 221 "KEY_SHOP"
"KEY_ALTERASE"
# key 223 "KEY_CANCEL"
# key 224 "KEY_BRIGHTNESSDOWN"
# key 225 "KEY_BRIGHTNESSUP"
HEADSETHOOK
BUTTON_SELECT
BUTTON_START
BUTTON_MODE
BUTTON_THUMBL
BUTTON_THUMBR
# key 352 "KEY_OK"
DPAD_CENTER
# key 354 "KEY_GOTO"
# key 355 "KEY_CLEAR"
# key 356 "KEY_POWER2"
# key 357 "KEY_OPTION"
# key 358 "KEY_INFO"
# key 359 "KEY_TIME"
# key 360 "KEY_VENDOR"
# key 361 "KEY_ARCHIVE"
# key 363 "KEY_CHANNEL"
# key 364 "KEY_FAVORITES"
# key 365 "KEY_EPG"
# key 367 "KEY_MHP"
# key 368 "KEY_LANGUAGE"
# key 369 "KEY_TITLE"
# key 370 "KEY_SUBTITLE"
# key 371 "KEY_ANGLE"
# key 372 "KEY_ZOOM"
# key 373 "KEY_MODE"
# key 374 "KEY_KEYBOARD"
# key 375 "KEY_SCREEN"
# key 376 "KEY_PC"
# key 378 "KEY_TV2"
# key 379 "KEY_VCR"
# key 380 "KEY_VCR2"
# key 381 "KEY_SAT"
# key 382 "KEY_SAT2"
# key 383 "KEY_CD"
# key 384 "KEY_TAPE"
# key 385 "KEY_RADIO"
# key 386 "KEY_TUNER"
# key 387 "KEY_PLAYER"
# key 388 "KEY_TEXT"
# key 389 "KEY_DVD"
# key 390 "KEY_AUX"
# key 391 "KEY_MP3"
# key 392 "KEY_AUDIO"
# key 393 "KEY_VIDEO"
# key 394 "KEY_DIRECTORY"
# key 395 "KEY_LIST"
# key 396 "KEY_MEMO"
# key 398 "KEY_RED"
# key 399 "KEY_GREEN"
# key 400 "KEY_YELLOW"
# key 401 "KEY_BLUE"
CHANNEL_UP
CHANNEL_DOWN
# key 404 "KEY_FIRST"
# key 405 "KEY_LAST"
# key 406 "KEY_AB"
# key 407 "KEY_NEXT"
# key 408 "KEY_RESTART"
# key 409 "KEY_SLOW"
# key 410 "KEY_SHUFFLE"
# key 411 "KEY_BREAK"
# key 412 "KEY_PREVIOUS"
# key 413 "KEY_DIGITS"
# key 414 "KEY_TEEN"
# key 415 "KEY_TWEN"
# key 448 "KEY_DEL_EOL"
# key 449 "KEY_DEL_EOS"
# key 450 "KEY_INS_LINE"
# key 451 "KEY_DEL_LINE"
# key 497 KEY_BRL_DOT1
# key 498 KEY_BRL_DOT2
# key 499 KEY_BRL_DOT3
# key 500 KEY_BRL_DOT4
# key 501 KEY_BRL_DOT5
# key 502 KEY_BRL_DOT6
# key 503 KEY_BRL_DOT7
# key 504 KEY_BRL_DOT8
# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 RX
axis 0x04 RY
axis 0x05 RZ
axis 0x06 THROTTLE
axis 0x07 RUDDER
axis 0x08 WHEEL
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y
BACK WAKE_DROPPED
有些没有用到的用'#'注释
kernel/include/linux/input.h
#ifndef _INPUT_H
#define _INPUT_H
* Copyright (c) 1-2002 Vojtech Pavlik
* This prog 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.
#ifdef __KERNEL__
#include &linux/time.h&
#include &linux/list.h&
#include &sys/time.h&
#include &sys/ioctl.h&
#include &sys/types.h&
#include &linux/types.h&
* The event structure itself
struct input_event {
* Protocol version.
#define EV_VERSION
* IOCTLs (0x00 - 0x7f)
struct input_id {
* struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls
* @value: latest reported value for the axis.
* @minimum: specifies minimum value for the axis.
* @maximum: specifies maximum value for the axis.
* @fuzz: specifies fuzz value that is used to filter noise from
* the event stream.
* @flat: values that are within this value will be discarded by
* joydev interface and reported as 0 instead.
* @resolution: specifies resolution for the values reported for
* the axis.
* Note that input core does not clamp reported values to the
* [minimum, maximum] limits, such task is left to userspace.
* Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in
* units per millimeter (units/mm), resolution for rotational axes
* (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian.
struct input_absinfo {
* struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls
* @scancode: scancode represented in machine-endian form.
* @len: length of the scancode that resides in @scancode buffer.
* @index: index in the keymap, may be used instead of scancode
* @flags: allows to specify how kernel should handle the request. For
* example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel
* should perform lookup in keymap by @index instead of @scancode
* @keycode: key code assigned to this scancode
* The structure is used to retrieve and modify keymap data. Users have
* option of performing lookup either by @scancode itself or by @index
* in keymap entry. EVIOCGKEYCODE will also return scancode or index
* (depending on which element was used to perform lookup).
struct input_keymap_entry {
#define INPUT_KEYMAP_BY_INDEX (1 && 0)
scancode[32];
#define EVIOCGVERSION
_IOR('E', 0x01, int)
/* get driver version */
#define EVIOCGID
_IOR('E', 0x02, struct input_id) /* get device ID */
#define EVIOCGREP
_IOR('E', 0x03, unsigned int[2]) /* get repeat settings */
#define EVIOCSREP
_IOW('E', 0x03, unsigned int[2]) /* set repeat settings */
#define EVIOCGKEYCODE
_IOR('E', 0x04, unsigned int[2])
/* get keycode */
#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry)
#define EVIOCSKEYCODE
_IOW('E', 0x04, unsigned int[2])
/* set keycode */
#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry)
#define EVIOCGNAME(len)
_IOC(_IOC_READ, 'E', 0x06, len)
/* get device name */
#define EVIOCGPHYS(len)
_IOC(_IOC_READ, 'E', 0x07, len)
/* get physical location */
#define EVIOCGUNIQ(len)
_IOC(_IOC_READ, 'E', 0x08, len)
/* get unique identifier */
#define EVIOCGPROP(len)
_IOC(_IOC_READ, 'E', 0x09, len)
/* get device properties */
#define EVIOCGKEY(len)
_IOC(_IOC_READ, 'E', 0x18, len)
/* get global key state */
#define EVIOCGLED(len)
_IOC(_IOC_READ, 'E', 0x19, len)
/* get all LEDs */
#define EVIOCGSND(len)
_IOC(_IOC_READ, 'E', 0x1a, len)
/* get all sounds status */
#define EVIOCGSW(len)
_IOC(_IOC_READ, 'E', 0x1b, len)
/* get all switch states */
#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */
#define EVIOCGABS(abs)
_IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */
#define EVIOCSABS(abs)
_IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */
#define EVIOCSFF
_IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */
#define EVIOCRMFF
_IOW('E', 0x81, int)
/* Erase a force effect */
#define EVIOCGEFFECTS
_IOR('E', 0x84, int)
/* Report number of effects playable at the same time */
#define EVIOCGRAB
_IOW('E', 0x90, int)
/* Grab/Release device */
#define EVIOCGSUSPENDBLOCK _IOR('E', 0x91, int)
/* get suspend block enable */
#define EVIOCSSUSPENDBLOCK _IOW('E', 0x91, int)
/* set suspend block enable */
* 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_MAX
#define INPUT_PROP_CNT
(INPUT_PROP_MAX + 1)
* Event types
#define EV_SYN
#define EV_KEY
#define EV_REL
#define EV_ABS
#define EV_MSC
#define EV_SW
#define EV_LED
#define EV_SND
#define EV_REP
#define EV_FF
#define EV_PWR
#define EV_FF_STATUS
#define EV_MAX
#define EV_CNT
(EV_MAX+1)
* Synchronization events.
#define SYN_REPORT
#define SYN_CONFIG
#define SYN_MT_REPORT
#define SYN_DROPPED
* 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_RESERVED
#define KEY_ESC
#define KEY_1
#define KEY_2
#define KEY_3
#define KEY_4
#define KEY_5
#define KEY_6
#define KEY_7
#define KEY_8
#define KEY_9
#define KEY_0
#define KEY_MINUS
#define KEY_EQUAL
#define KEY_BACKSPACE
#define KEY_TAB
#define KEY_Q
#define KEY_W
#define KEY_E
#define KEY_R
#define KEY_T
#define KEY_Y
#define KEY_U
#define KEY_I
#define KEY_O
#define KEY_P
#define KEY_LEFTBRACE
#define KEY_RIGHTBRACE
#define KEY_ENTER
#define KEY_LEFTCTRL
#define KEY_A
#define KEY_S
#define KEY_D
#define KEY_F
#define KEY_G
#define KEY_H
#define KEY_J
#define KEY_K
#define KEY_L
#define KEY_SEMICOLON
#define KEY_APOSTROPHE
#define KEY_GRAVE
#define KEY_LEFTSHIFT
#define KEY_BACKSLASH
#define KEY_Z
#define KEY_X
#define KEY_C
#define KEY_V
#define KEY_B
#define KEY_N
#define KEY_M
#define KEY_COMMA
#define KEY_DOT
#define KEY_SLASH
#define KEY_RIGHTSHIFT
#define KEY_KPASTERISK
#define KEY_LEFTALT
#define KEY_SPACE
#define KEY_CAPSLOCK
#define KEY_F1
#define KEY_F2
#define KEY_F3
#define KEY_F4
#define KEY_F5
#define KEY_F6
#define KEY_F7
#define KEY_F8
#define KEY_F9
#define KEY_F10
#define KEY_NUMLOCK
#define KEY_SCROLLLOCK
#define KEY_KP7
#define KEY_KP8
#define KEY_KP9
#define KEY_KPMINUS
#define KEY_KP4
#define KEY_KP5
#define KEY_KP6
#define KEY_KPPLUS
#define KEY_KP1
#define KEY_KP2
#define KEY_KP3
#define KEY_KP0
#define KEY_KPDOT
#define KEY_ZENKAKUHANKAKU 85
#define KEY_102ND
#define KEY_F11
#define KEY_F12
#define KEY_RO
#define KEY_KATAKANA
#define KEY_HIRAGANA
#define KEY_HENKAN
#define KEY_KATAKANAHIRAGANA 93
#define KEY_MUHENKAN
#define KEY_KPJPCOMMA
#define KEY_KPENTER
#define KEY_RIGHTCTRL
#define KEY_KPSLASH
#define KEY_SYSRQ
#define KEY_RIGHTALT
#define KEY_LINEFEED
#define KEY_HOME
#define KEY_UP
#define KEY_PAGEUP
#define KEY_LEFT
#define KEY_RIGHT
#define KEY_END
#define KEY_DOWN
#define KEY_PAGEDOWN
#define KEY_INSERT
#define KEY_DELETE
#define KEY_MACRO
#define KEY_MUTE
#define KEY_VOLUMEDOWN
#define KEY_VOLUMEUP
#define KEY_POWER
116 /* SC System Power Down */
#define KEY_KPEQUAL
#define KEY_KPPLUSMINUS
#define KEY_PAUSE
#define KEY_SCALE
120 /* AL Compiz Scale (Expose) */
#define KEY_KPCOMMA
#define KEY_HANGEUL
#define KEY_HANGUEL
KEY_HANGEUL
#define KEY_HANJA
#define KEY_YEN
#define KEY_LEFTMETA
#define KEY_RIGHTMETA
#define KEY_COMPOSE
#define KEY_STOP
128 /* AC Stop */
#define KEY_AGAIN
#define KEY_PROPS
130 /* AC Properties */
#define KEY_UNDO
131 /* AC Undo */
#define KEY_FRONT
#define KEY_COPY
133 /* AC Copy */
#define KEY_OPEN
134 /* AC Open */
#define KEY_PASTE
135 /* AC Paste */
#define KEY_FIND
136 /* AC Search */
#define KEY_CUT
137 /* AC Cut */
#define KEY_HELP
138 /* AL Integrated Help Center */
#define KEY_MENU
139 /* Menu (show menu) */
#define KEY_CALC
140 /* AL Calculator */
#define KEY_SETUP
#define KEY_SLEEP
142 /* SC System Sleep */
#define KEY_WAKEUP
143 /* System Wake Up */
#define KEY_FILE
144 /* AL Local Machine Browser */
#define KEY_SENDFILE
#define KEY_DELETEFILE
#define KEY_XFER
#define KEY_PROG1
#define KEY_PROG2
#define KEY_WWW
150 /* AL Internet Browser */
#define KEY_MSDOS
#define KEY_COFFEE
152 /* AL Terminal Lock/Screensaver */
#define KEY_SCREENLOCK
KEY_COFFEE
#define KEY_DIRECTION
#define KEY_CYCLEWINDOWS 154
#define KEY_MAIL
#define KEY_BOOKMARKS
156 /* AC Bookmarks */
#define KEY_COMPUTER
#define KEY_BACK
158 /* AC Back */
#define KEY_FORWARD
159 /* AC Forward */
#define KEY_CLOSECD
#define KEY_EJECTCD
#define KEY_EJECTCLOSECD 162
#define KEY_NEXTSONG
#define KEY_PLAYPAUSE
#define KEY_PREVIOUSSONG 165
#define KEY_STOPCD
#define KEY_RECORD
#define KEY_REWIND
#define KEY_PHONE
169 /* Media Select Telephone */
#define KEY_ISO
#define KEY_CONFIG
171 /* AL Consumer Control Configuration */
#define KEY_HOMEPAGE
172 /* AC Home */
#define KEY_REFRESH
173 /* AC Refresh */
#define KEY_EXIT
174 /* AC Exit */
#define KEY_MOVE
#define KEY_EDIT
#define KEY_SCROLLUP
#define KEY_SCROLLDOWN
#define KEY_KPLEFTPAREN
#define KEY_KPRIGHTPAREN 180
#define KEY_NEW
181 /* AC New */
#define KEY_REDO
182 /* AC Redo/Repeat */
#define KEY_F13
#define KEY_F14
#define KEY_F15
#define KEY_F16
#define KEY_F17
#define KEY_F18
#define KEY_F19
#define KEY_F20
#define KEY_F21
#define KEY_F22
#define KEY_F23
#define KEY_F24
#define KEY_PLAYCD
#define KEY_PAUSECD
#define KEY_PROG3
#define KEY_PROG4
#define KEY_DASHBOARD
204 /* AL Dashboard */
#define KEY_SUSPEND
#define KEY_CLOSE
206 /* AC Close */
#define KEY_PLAY
#define KEY_FASTFORWARD
#define KEY_BASSBOOST
#define KEY_PRINT
210 /* AC Print */
#define KEY_HP
#define KEY_CAMERA
#define KEY_SOUND
#define KEY_QUESTION
#define KEY_EMAIL
#define KEY_CHAT
#define KEY_SEARCH
#define KEY_CONNECT
#define KEY_FINANCE
219 /* AL Checkbook/Finance */
#define KEY_SPORT
#define KEY_SHOP
#define KEY_ALTERASE
#define KEY_CANCEL
223 /* AC Cancel */
#define KEY_BRIGHTNESSDOWN 224
#define KEY_BRIGHTNESSUP 225
#define KEY_MEDIA
#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video
outputs (Monitor/LCD/TV-out/etc) */
#define KEY_KBDILLUMTOGGLE 228
#define KEY_KBDILLUMDOWN 229
#define KEY_KBDILLUMUP
#define KEY_SEND
231 /* AC Send */
#define KEY_REPLY
232 /* AC Reply */
#define KEY_FORWARDMAIL
233 /* AC Forward Msg */
#define KEY_SAVE
234 /* AC Save */
#define KEY_DOCUMENTS
#define KEY_BATTERY
#define KEY_BLUETOOTH
#define KEY_WLAN
#define KEY_UWB
#define KEY_UNKNOWN
#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_ZERO 244 /* brightness off, use ambient */
#define KEY_DISPLAY_OFF
245 /* display device to off state */
#define KEY_WIMAX
#define KEY_RFKILL
247 /* Key that controls all radios */
/* Code 255 is reserved for special needs of AT keyboard driver */
#define BTN_MISC
#define BTN_0
#define BTN_1
#define BTN_2
#define BTN_3
#define BTN_4
#define BTN_5
#define BTN_6
#define BTN_7
#define BTN_8
#define BTN_9
#define BTN_MOUSE
#define BTN_LEFT
#define BTN_RIGHT
#define BTN_MIDDLE
#define BTN_SIDE
#define BTN_EXTRA
#define BTN_FORWARD
#define BTN_BACK
#define BTN_TASK
#define BTN_JOYSTICK
#define BTN_TRIGGER
#define BTN_THUMB
#define BTN_THUMB2
#define BTN_TOP
#define BTN_TOP2
#define BTN_PINKIE
#define BTN_BASE
#define BTN_BASE2
#define BTN_BASE3
#define BTN_BASE4
#define BTN_BASE5
#define BTN_BASE6
#define BTN_DEAD
#define BTN_GAMEPAD
#define BTN_A
#define BTN_B
#define BTN_C
#define BTN_X
#define BTN_Y
#define BTN_Z
#define BTN_TL
#define BTN_TR
#define BTN_TL2
#define BTN_TR2
#define BTN_SELECT
#define BTN_START
#define BTN_MODE
#define BTN_THUMBL
#define BTN_THUMBR
#define BTN_DIGI
#define BTN_TOOL_PEN
#define BTN_TOOL_RUBBER
#define BTN_TOOL_BRUSH
#define BTN_TOOL_PENCIL
#define BTN_TOOL_AIRBRUSH 0x144
#define BTN_TOOL_FINGER
#define BTN_TOOL_MOUSE
#define BTN_TOOL_LENS
#define BTN_TOUCH
#define BTN_STYLUS
#define BTN_STYLUS2
#define BTN_TOOL_DOUBLETAP 0x14d
#define BTN_TOOL_TRIPLETAP 0x14e
#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */
#define BTN_WHEEL
#define BTN_GEAR_DOWN
#define BTN_GEAR_UP
#define KEY_OK
#define KEY_SELECT
#define KEY_GOTO
#define KEY_CLEAR
#define KEY_POWER2
#define KEY_OPTION
#define KEY_INFO
0x166 /* AL OEM Features/Tips/Tutorial */
#define KEY_TIME
#define KEY_VENDOR
#define KEY_ARCHIVE
#define KEY_PROGRAM
0x16a /* Media Select Program Guide */
#define KEY_CHANNEL
#define KEY_FAVORITES
#define KEY_EPG
#define KEY_PVR
0x16e /* Media Select Home */
#define KEY_MHP
#define KEY_LANGUAGE
#define KEY_TITLE
#define KEY_SUBTITLE
#define KEY_ANGLE
#define KEY_ZOOM
#define KEY_MODE
#define KEY_KEYBOARD
#define KEY_SCREEN
#define KEY_PC
0x178 /* Media Select Computer */
#define KEY_TV
0x179 /* Media Select TV */
#define KEY_TV2
0x17a /* Media Select Cable */
#define KEY_VCR
0x17b /* Media Select VCR */
#define KEY_VCR2
0x17c /* VCR Plus */
#define KEY_SAT
0x17d /* Media Select Satellite */
#define KEY_SAT2
#define KEY_CD
0x17f /* Media Select CD */
#define KEY_TAPE
0x180 /* Media Select Tape */
#define KEY_RADIO
#define KEY_TUNER
0x182 /* Media Select Tuner */
#define KEY_PLAYER
#define KEY_TEXT
#define KEY_DVD
0x185 /* Media Select DVD */
#define KEY_AUX
#define KEY_MP3
#define KEY_AUDIO
0x188 /* AL Audio Browser */
#define KEY_VIDEO
0x189 /* AL Movie Browser */
#define KEY_DIRECTORY
#define KEY_LIST
#define KEY_MEMO
0x18c /* Media Select Messages */
#define KEY_CALENDAR
#define KEY_RED
#define KEY_GREEN
#define KEY_YELLOW
#define KEY_BLUE
#define KEY_CHANNELUP
0x192 /* Channel Increment */
#define KEY_CHANNELDOWN
0x193 /* Channel Decrement */
#define KEY_FIRST
#define KEY_LAST
0x195 /* Recall Last */
#define KEY_AB
#define KEY_NEXT
#define KEY_RESTART
#define KEY_SLOW
#define KEY_SHUFFLE
#define KEY_BREAK
#define KEY_PREVIOUS
#define KEY_DIGITS
#define KEY_TEEN
#define KEY_TWEN
#define KEY_VIDEOPHONE
0x1a0 /* Media Select Video Phone */
#define KEY_GAMES
0x1a1 /* Media Select Games */
#define KEY_ZOOMIN
0x1a2 /* AC Zoom In */
#define KEY_ZOOMOUT
0x1a3 /* AC Zoom Out */
#define KEY_ZOOMRESET
0x1a4 /* AC Zoom */
#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */
#define KEY_EDITOR
0x1a6 /* AL Text Editor */
#define KEY_SPREADSHEET
0x1a7 /* AL Spreadsheet */
#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */
#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */
#define KEY_DATABASE
0x1aa /* AL Database App */
#define KEY_NEWS
0x1ab /* AL Newsreader */
#define KEY_VOICEMAIL
0x1ac /* AL Voicemail */
#define KEY_ADDRESSBOOK
0x1ad /* AL Contacts/Address Book */
#define KEY_MESSENGER
0x1ae /* AL Instant Messaging */
#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */
#define KEY_SPELLCHECK
/* AL Spell Check */
#define KEY_LOGOFF
/* AL Logoff */
#define KEY_DOLLAR
#define KEY_EURO
#define KEY_FRAMEBACK
0x1b4 /* Consumer - transport controls */
#define KEY_FRAMEFORWARD 0x1b5
#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */
#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */
#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */
#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */
#define KEY_IMAGES
0x1ba /* AL Image Browser */
#define KEY_DEL_EOL
#define KEY_DEL_EOS
#define KEY_INS_LINE
#define KEY_DEL_LINE
#define KEY_FN
#define KEY_FN_ESC
#define KEY_FN_F1
#define KEY_FN_F2
#define KEY_FN_F3
#define KEY_FN_F4
#define KEY_FN_F5
#define KEY_FN_F6
#define KEY_FN_F7
#define KEY_FN_F8
#define KEY_FN_F9
#define KEY_FN_F10
#define KEY_FN_F11
#define KEY_FN_F12
#define KEY_FN_1
#define KEY_FN_2
#define KEY_FN_D
#define KEY_FN_E
#define KEY_FN_F
#define KEY_FN_S
#define KEY_FN_B
#define KEY_BRL_DOT1
#define KEY_BRL_DOT2
#define KEY_BRL_DOT3
#define KEY_BRL_DOT4
#define KEY_BRL_DOT5
#define KEY_BRL_DOT6
#define KEY_BRL_DOT7
#define KEY_BRL_DOT8
#define KEY_BRL_DOT9
#define KEY_BRL_DOT10
#define KEY_NUMERIC_0
0x200 /* used by phones, remote controls, */
#define KEY_NUMERIC_1
0x201 /* and other keypads */
#define KEY_NUMERIC_2
#define KEY_NUMERIC_3
#define KEY_NUMERIC_4
#define KEY_NUMERIC_5
#define KEY_NUMERIC_6
#define KEY_NUMERIC_7
#define KEY_NUMERIC_8
#define KEY_NUMERIC_9
#define KEY_NUMERIC_STAR 0x20a
#define KEY_NUMERIC_POUND 0x20b
#define KEY_CAMERA_FOCUS 0x210
#define KEY_WPS_BUTTON
0x211 /* WiFi Protected Setup key */
#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */
#define KEY_TOUCHPAD_ON
#define KEY_TOUCHPAD_OFF 0x214
#define KEY_CAMERA_ZOOMIN 0x215
#define KEY_CAMERA_ZOOMOUT 0x216
#define KEY_CAMERA_UP
#define KEY_CAMERA_DOWN
#define KEY_CAMERA_LEFT
#define KEY_CAMERA_RIGHT 0x21a
#define BTN_TRIGGER_HAPPY
#define BTN_TRIGGER_HAPPY1
#define BTN_TRIGGER_HAPPY2
#define BTN_TRIGGER_HAPPY3
#define BTN_TRIGGER_HAPPY4
#define BTN_TRIGGER_HAPPY5
#define BTN_TRIGGER_HAPPY6
#define BTN_TRIGGER_HAPPY7
#define BTN_TRIGGER_HAPPY8
#define BTN_TRIGGER_HAPPY9
#define BTN_TRIGGER_HAPPY10
#define BTN_TRIGGER_HAPPY11
#define BTN_TRIGGER_HAPPY12
#define BTN_TRIGGER_HAPPY13
#define BTN_TRIGGER_HAPPY14
#define BTN_TRIGGER_HAPPY15
#define BTN_TRIGGER_HAPPY16
#define BTN_TRIGGER_HAPPY17
#define BTN_TRIGGER_HAPPY18
#define BTN_TRIGGER_HAPPY19
#define BTN_TRIGGER_HAPPY20
#define BTN_TRIGGER_HAPPY21
#define BTN_TRIGGER_HAPPY22
#define BTN_TRIGGER_HAPPY23
#define BTN_TRIGGER_HAPPY24
#define BTN_TRIGGER_HAPPY25
#define BTN_TRIGGER_HAPPY26
#define BTN_TRIGGER_HAPPY27
#define BTN_TRIGGER_HAPPY28
#define BTN_TRIGGER_HAPPY29
#define BTN_TRIGGER_HAPPY30
#define BTN_TRIGGER_HAPPY31
#define BTN_TRIGGER_HAPPY32
#define BTN_TRIGGER_HAPPY33
#define BTN_TRIGGER_HAPPY34
#define BTN_TRIGGER_HAPPY35
#define BTN_TRIGGER_HAPPY36
#define BTN_TRIGGER_HAPPY37
#define BTN_TRIGGER_HAPPY38
#define BTN_TRIGGER_HAPPY39
#define BTN_TRIGGER_HAPPY40
/* We avoid low common keys in module aliases so they don't get huge. */
#define KEY_MIN_INTERESTING KEY_MUTE
#define KEY_MAX
#define KEY_CNT
(KEY_MAX+1)
* Relative axes
#define REL_X
#define REL_Y
#define REL_Z
#define REL_RX
#define REL_RY
#define REL_RZ
#define REL_HWHEEL
#define REL_DIAL
#define REL_WHEEL
#define REL_MISC
#define REL_MAX
#define REL_CNT
(REL_MAX+1)
* Absolute axes
#define ABS_X
#define ABS_Y
#define ABS_Z
#define ABS_RX
#define ABS_RY
#define ABS_RZ
#define ABS_THROTTLE
#define ABS_RUDDER
#define ABS_WHEEL
#define ABS_GAS
#define ABS_BRAKE
#define ABS_HAT0X
#define ABS_HAT0Y
#define ABS_HAT1X
#define ABS_HAT1Y
#define ABS_HAT2X
#define ABS_HAT2Y
#define ABS_HAT3X
#define ABS_HAT3Y
#define ABS_PRESSURE
#define ABS_DISTANCE
#define ABS_TILT_X
#define ABS_TILT_Y
#define ABS_TOOL_WIDTH
#define ABS_VOLUME
#define ABS_MISC
#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 ellipse position */
#define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse 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 */
#ifdef __KERNEL__
/* Implementation details, userspace should not care about these */
#define ABS_MT_FIRST
ABS_MT_TOUCH_MAJOR
#define ABS_MT_LAST
ABS_MT_DISTANCE
#define ABS_MAX
#define ABS_CNT
(ABS_MAX+1)
* Switch events
#define SW_LID
/* set = lid shut */
#define SW_TABLET_MODE
/* set = tablet mode */
#define SW_HEADPHONE_INSERT 0x02
/* set = inserted */
#define SW_RFKILL_ALL
/* 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
/* 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
/* set = keypad slide out */
#define SW_FRONT_PROXIMITY 0x0b
/* set = front proximity sensor active */
#define SW_ROTATE_LOCK
/* set = rotate locked/disabled */
#define SW_MAX
#define SW_CNT
(SW_MAX+1)
* Misc events
#define MSC_SERIAL
#define MSC_PULSELED
#define MSC_GESTURE
#define MSC_RAW
#define MSC_SCAN
#define MSC_MAX
#define MSC_CNT
(MSC_MAX+1)
#define LED_NUML
#define LED_CAPSL
#define LED_SCROLLL
#define LED_COMPOSE
#define LED_KANA
#define LED_SLEEP
#define LED_SUSPEND
#define LED_MUTE
#define LED_MISC
#define LED_MAIL
#define LED_CHARGING
#define LED_MAX
#define LED_CNT
(LED_MAX+1)
* Autorepeat values
#define REP_DELAY
#define REP_PERIOD
#define REP_MAX
#define REP_CNT
(REP_MAX+1)
#define SND_CLICK
#define SND_BELL
#define SND_TONE
#define SND_MAX
#define SND_CNT
(SND_MAX+1)
#define ID_BUS
#define ID_VENDOR
#define ID_PRODUCT
#define ID_VERSION
#define BUS_PCI
#define BUS_ISAPNP
#define BUS_USB
#define BUS_HIL
#define BUS_BLUETOOTH
#define BUS_VIRTUAL
#define BUS_ISA
#define BUS_I
#define BUS_XTKBD
#define BUS_RS232
#define BUS_GAMEPORT
#define BUS_PARPORT
#define BUS_AMIGA
#define BUS_ADB
#define BUS_I2C
#define BUS_HOST
#define BUS_GSC
#define BUS_ATARI
#define BUS_SPI
* MT_TOOL types
#define MT_TOOL_FINGER
#define MT_TOOL_PEN
#define MT_TOOL_MAX
* Values describing the status of a force-feedback effect
#define FF_STATUS_STOPPED 0x00
#define FF_STATUS_PLAYING 0x01
#define FF_STATUS_MAX
* Structures used in ioctls to upload effects to a device
* They are pieces of a bigger structure (called ff_effect)
* All duration values are expressed in ms. Values above 32767 ms (0x7fff)
* should not be used and have unspecified results.
* struct ff_replay - defines scheduling of the force-feedback effect
* @length: duration of the effect
* @delay: delay before effect should start playing
struct ff_replay {
* struct ff_trigger - defines what triggers the force-feedback effect
* @button: number of the button triggering the effect
* @interval: controls how soon the effect can be re-triggered
struct ff_trigger {
* struct ff_envelope - generic force-feedback effect envelope
* @attack_length: duration of the attack (ms)
* @attack_level: level at the beginning of the attack
* @fade_length: duration of fade (ms)
* @fade_level: level at the end of fade
* The @attack_level and @fade_level when applying
* envelope force-feedback core will convert to positive/negative
* value based on polarity of the default level of the effect.
* Valid range for the attack and fade levels is 0x0 - 0x7fff
struct ff_envelope {
__u16 attack_
__u16 attack_
__u16 fade_
__u16 fade_
* struct ff_constant_effect - defines parameters of a constant force-feedback effect
* @level: st may be negative
* @envelope: envelope data
struct ff_constant_effect {
struct ff_
* struct ff_ramp_effect - defines parameters of a ramp force-feedback effect
* @start_level: beginning st may be negative
* @end_level: final st may be negative
* @envelope: envelope data
struct ff_ramp_effect {
__s16 start_
__s16 end_
struct ff_
* struct ff_condition_effect - defines a spring or friction force-feedback effect
* @right_saturation: maximum level when joystick moved all way to the right
* @left_saturation: same for the left side
* @right_coeff: controls how fast the force grows when the joystick moves
* to the right
* @left_coeff: same for the left side
* @deadband: size of the dead zone, where no force is produced
* @center: position of the dead zone
struct ff_condition_effect {
__u16 right_
__u16 left_
__s16 right_
__s16 left_
* struct ff_periodic_effect - defines parameters of a periodic force-feedback effect
* @waveform: kind of the effect (wave)
* @period: period of the wave (ms)
* @magnitude: peak value
* @offset: mean value of the wave (roughly)
* @phase: 'horizontal' shift
* @envelope: envelope data
* @custom_len: number of samples (FF_CUSTOM only)
* @custom_data: buffer of samples (FF_CUSTOM only)
* Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP,
* FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined
* for the time being as no driver supports it yet.
* Note: the data pointed by custom_data is copied by the driver.
* You can therefore dispose of the memory after the upload/update.
struct ff_periodic_effect {
struct ff_
__u32 custom_
__s16 __user *custom_
* struct ff_rumble_effect - defines parameters of a periodic force-feedback effect
* @strong_magnitude: magnitude of the heavy motor
* @weak_magnitude: magnitude of the light one
* Some rumble pads have two motors of different weight. Strong_magnitude
* represents the magnitude of the vibration generated by the heavy one.
struct ff_rumble_effect {
__u16 strong_
__u16 weak_
* struct ff_effect - defines force feedback effect
* @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
* FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM)
* @id: an unique id assigned to an effect
* @direction: direction of the effect
* @trigger: trigger conditions (struct ff_trigger)
* @replay: scheduling of the effect (struct ff_replay)
* @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect,
* ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further
* defining effect parameters
* This structure is sent through ioctl from the application to the driver.
* To create a new effect application should set its @id to -1; the kernel
* will return assigned @id which can later be used to update or delete
* this effect.
* Direction of the effect is encoded as follows:
* 0 deg -& 0x0 (down)
* 90 deg -& 0x4 (left)
* 180 deg -& 0x8 (up)
* 270 deg -& 0xC (right)
struct ff_effect {
struct ff_
struct ff_
struct ff_constant_
struct ff_ramp_
struct ff_periodic_
struct ff_condition_effect condition[2]; /* One for each axis */
struct ff_rumble_
* Force feedback effect types
#define FF_RUMBLE 0x50
#define FF_PERIODIC 0x51
#define FF_CONSTANT 0x52
#define FF_SPRING 0x53
#define FF_FRICTION 0x54
#define FF_DAMPER 0x55
#define FF_INERTIA 0x56
#define FF_RAMP
#define FF_EFFECT_MIN FF_RUMBLE
#define FF_EFFECT_MAX FF_RAMP
* Force feedback periodic effect types
#define FF_SQUARE 0x58
#define FF_TRIANGLE 0x59
#define FF_SINE
#define FF_SAW_UP 0x5b
#define FF_SAW_DOWN 0x5c
#define FF_CUSTOM 0x5d
#define FF_WAVEFORM_MIN FF_SQUARE
#define FF_WAVEFORM_MAX FF_CUSTOM
* Set ff device properties
#define FF_GAIN
#define FF_AUTOCENTER 0x61
#define FF_MAX
#define FF_CNT
(FF_MAX+1)
#ifdef __KERNEL__
* In-kernel definitions.
#include &linux/device.h&
#include &linux/fs.h&
#include &linux/timer.h&
#include &linux/mod_devicetable.h&
* struct input_dev - represents an input device
* @name: name of the device
* @phys: physical path to the device in the system hierarchy
* @uniq: unique identification code for the device (if device has it)
* @id: id of the device (struct input_id)
* @propbit: bitmap of device properties and quirks
* @evbit: bitmap of types of events supported by the device (EV_KEY,
* EV_REL, etc.)
* @keybit: bitmap of keys/buttons this device has
* @relbit: bitmap of relative axes for the device
* @absbit: bitmap of absolute axes for the device
* @mscbit: bitmap of miscellaneous events supported by the device
* @ledbit: bitmap of leds present on the device
* @sndbit: bitmap of sound effects supported by the device
* @ffbit: bitmap of force feedback effects supported by the device
* @swbit: bitmap of switches present on the device
* @hint_events_per_packet: average number of events generated by the
* device in a packet (between EV_SYN/SYN_REPORT events). Used by
* event handlers to estimate size of the buffer needed to hold
* @keycodemax: size of keycode table
* @keycodesize: size of elements in keycode table
* @keycode: map of scancodes to keycodes for this device
* @getkeycode: optional legacy method to retrieve current keymap.
* @setkeycode: optional method to alter current keymap, used to implement
* sparse keymaps. If not supplied default mechanism will be used.
* The method is being called while holding event_lock and thus must
* not sleep
* @ff: force feedback structure associated with the device if device
* supports force feedback effects
* @repeat_key: stores key code of
used to implement
* software autorepeat
* @timer: timer for software autorepeat
* @rep: current values for autorepeat parameters (delay, rate)
* @mt: pointer to array of struct input_mt_slot holding current values
* of tracked contacts
* @mtsize: number of MT slots the device uses
* @slot: MT slot currently being transmitted
* @trkid: stores MT tracking ID for the current contact
* @absinfo: array of &struct input_absinfo elements holding information
* about absolute axes (current value, min, max, flat, fuzz,
* resolution)
* @key: reflects current state of device's keys/buttons
* @led: reflects current state of device's LEDs
* @snd: reflects current state of sound effects
* @sw: reflects current state of device's switches
* @open: this method is called when the very first user calls
* input_open_device(). The driver must prepare the device
* to start generating events (start polling thread,
* request an IRQ, submit URB, etc.)
* @close: this method is called when the very last user calls
* input_close_device().
* @flush: purges the device. Most commonly used to get rid of force
* feedback effects loaded into the device when disconnecting
* @event: event handler for events sent _to_ the device, like EV_LED
* or EV_SND. The device is expected to carry out the requested
* action (turn on a LED, play sound, etc.) The call is protected
* by @event_lock and must not sleep
* @grab: input handle that currently has the device grabbed (via
* EVIOCGRAB ioctl). When a handle grabs a device it becomes sole
* recipient for all input events coming from the device
* @event_lock: this spinlock is is taken when input core receives
* and processes a new event for the device (in input_event()).
* Code that accesses and/or modifies parameters of a device
* (such as keymap or absmin, absmax, absfuzz, etc.) after device
* has been registered with input core must take this lock.
* @mutex: serializes calls to open(), close() and flush() methods
* @users: stores number of users (input handlers) that opened this
* device. It is used by input_open_device() and input_close_device()
* to make sure that dev-&open() is only called when the first
* user opens device and dev-&close() is called when the very
* last user closes the device
* @going_away: marks devices that are in a middle of unregistering and
* causes input_open_device*() fail with -ENODEV.
* @sync: set to %true when there were no new events since last EV_SYN
* @dev: driver model's view of this device
* @h_list: list of input handles associated with the device. When
* accessing the list dev-&mutex must be held
* @node: used to place the device onto input_dev_list
struct input_dev {
const char *
const char *
const char *
struct input_
unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)];
unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];
unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];
unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];
unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];
unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
unsigned int hint_events_per_
int (*setkeycode)(struct input_dev *dev,
const struct input_keymap_entry *ke,
unsigned int *old_keycode);
int (*getkeycode)(struct input_dev *dev,
struct input_keymap_entry *ke);
struct ff_device *
unsigned int repeat_
struct timer_
int rep[REP_CNT];
struct input_mt_slot *
struct input_absinfo *
unsigned long key[BITS_TO_LONGS(KEY_CNT)];
unsigned long led[BITS_TO_LONGS(LED_CNT)];
unsigned long snd[BITS_TO_LONGS(SND_CNT)];
unsigned long sw[BITS_TO_LONGS(SW_CNT)];
int (*open)(struct input_dev *dev);
void (*close)(struct input_dev *dev);
int (*flush)(struct input_dev *dev, struct file *file);
int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
struct input_handle __rcu *
spinlock_t event_
bool going_
struct list_head h_
struct list_head
#define to_input_dev(d) container_of(d, struct input_dev, dev)
* Verify that we are in sync with input_device_id mod_devicetable.h #defines
#if EV_MAX != INPUT_DEVICE_ID_EV_MAX
#error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match"
#if KEY_MIN_INTERESTING != INPUT_DEVICE_ID_KEY_MIN_INTERESTING
#error "KEY_MIN_INTERESTING and INPUT_DEVICE_ID_KEY_MIN_INTERESTING do not match"
#if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX
#error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match"
#if REL_MAX != INPUT_DEVICE_ID_REL_MAX
#error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match"
#if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX
#error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match"
#if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX
#error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match"
#if LED_MAX != INPUT_DEVICE_ID_LED_MAX
#error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match"
#if SND_MAX != INPUT_DEVICE_ID_SND_MAX
#error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match"
#if FF_MAX != INPUT_DEVICE_ID_FF_MAX
#error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match"
#if SW_MAX != INPUT_DEVICE_ID_SW_MAX
#error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match"
#define INPUT_DEVICE_ID_MATCH_DEVICE \
(INPUT_DEVICE_ID_MATCH_BUS
INPUT_DEVICE_ID_MATCH_VENDOR
INPUT_DEVICE_ID_MATCH_PRODUCT)
#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
(INPUT_DEVICE_ID_MATCH_DEVICE
INPUT_DEVICE_ID_MATCH_VERSION)
struct input_
* struct input_handler - implements one of interfaces for input devices
* @private: driver-specific data
* @event: event handler. This method is being called by input core with
* interrupts disabled and dev-&event_lock spinlock held and so
* it may not sleep
* @filter: similar to @ separates normal event handlers from
* "filters".
* @match: called after comparing device's id with handler's id_table
* to perform fine-grained matching between device and handler
* @connect: called when attaching a handler to an input device
* @disconnect: disconnects a handler from input device
* @start: starts handler for given handle. This function is called by
* input core right after connect() method and also when a process
* that "grabbed" a device releases it
* @fops: file operations this driver implements
* @minor: beginning of range of 32 minors for devices this driver
* can provide
* @name: name of the handler, to be shown in /proc/bus/input/handlers
* @id_table: pointer to a table of input_device_ids this driver can
* @h_list: list of input handles associated with the handler
* @node: for placing the driver onto input_handler_list
* Input handlers attach to input devices and create input handles. There
* are likely several handlers attached to any given input device at the
* same time. All of them will get their copy of input event generated by
* the device.
* The very same structure is used to implement input filters. Input core
* allows filters to run first and will not pass event to regular handlers
* if any of the filters indicate that the event should be filtered (by
* returning %true from their filter() method).
* Note that input core serializes calls to connect() and disconnect()
* methods.
struct input_handler {
void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
bool (*match)(struct input_handler *handler, struct input_dev *dev);
int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
void (*disconnect)(struct input_handle *handle);
void (*start)(struct input_handle *handle);
const struct file_operations *
const char *
const struct input_device_id *id_
struct list_head h_
struct list_head
* struct input_handle - links input device with an input handler
* @private: handler-specific data
* @open: counter showing whether the handle is 'open', i.e. should deliver
* events from its device
* @name: name given to the handle by handler that created it
* @dev: input device the handle is attached to
* @handler: handler that works with the device through this handle
* @d_node: used to put the handle on device's list of attached handles
* @h_node: used to put the handle on handler's list of handles from which
* it gets events
struct input_handle {
const char *
struct input_dev *
struct input_handler *
struct list_head d_
struct list_head h_
struct input_dev *input_allocate_device(void);
void input_free_device(struct input_dev *dev);
static inline struct input_dev *input_get_device(struct input_dev *dev)
return dev ? to_input_dev(get_device(&dev-&dev)) : NULL;
static inline void input_put_device(struct input_dev *dev)
put_device(&dev-&dev);
static inline void *input_get_drvdata(struct input_dev *dev)
return dev_get_drvdata(&dev-&dev);
static inline void input_set_drvdata(struct input_dev *dev, void *data)
dev_set_drvdata(&dev-&dev, data);
int __must_check input_register_device(struct input_dev *);
void input_unregister_device(struct input_dev *);
void input_reset_device(struct input_dev *);
int __must_check input_register_handler(struct input_handler *);
void input_unregister_handler(struct input_handler *);
int input_handler_for_each_handle(struct input_handler *, void *data,
int (*fn)(struct input_handle *, void *));
int input_register_handle(struct input_handle *);
void input_unregister_handle(struct input_handle *);
int input_grab_device(struct input_handle *);
void input_release_device(struct input_handle *);
int input_open_device(struct input_handle *);
void input_close_device(struct input_handle *);
int input_flush_device(struct input_handle *handle, struct file *file);
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
static inline void input_report_key(struct input_dev *dev, unsigned int code, int value)
input_event(dev, EV_KEY, code, !!value);
static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value)
input_event(dev, EV_REL, code, value);
static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value)
input_event(dev, EV_ABS, code, value);
static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value)
input_event(dev, EV_FF_STATUS, code, value);
static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value)
input_event(dev, EV_SW, code, !!value);
static inline void input_sync(struct input_dev *dev)
input_event(dev, EV_SYN, SYN_REPORT, 0);
static inline void input_mt_sync(struct input_dev *dev)
input_event(dev, EV_SYN, SYN_MT_REPORT, 0);
void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code);
* input_set_events_per_packet - tell handlers about the driver event rate
* @dev: the input device used by the driver
* @n_events: the average number of events between calls to input_sync()
* If the event rate sent from a device is unusually large, use this
* function to set the expected event rate. This will allow handlers
* to set up an appropriate buffer size for the event stream, in order
* to minimize information loss.
static inline void input_set_events_per_packet(struct input_dev *dev, int n_events)
dev-&hint_events_per_packet = n_
void input_alloc_absinfo(struct input_dev *dev);
void input_set_abs_params(struct input_dev *dev, unsigned int axis,
int min, int max, int fuzz, int flat);
#define INPUT_GENERATE_ABS_ACCESSORS(_suffix, _item)
static inline int input_abs_get_##_suffix(struct input_dev *dev, \
unsigned int axis)
return dev-&absinfo ? dev-&absinfo[axis]._item : 0;
static inline void input_abs_set_##_suffix(struct input_dev *dev, \
unsigned int axis, int val) \
input_alloc_absinfo(dev);
if (dev-&absinfo)
dev-&absinfo[axis]._item =
INPUT_GENERATE_ABS_ACCESSORS(val, value)
INPUT_GENERATE_ABS_ACCESSORS(min, minimum)
INPUT_GENERATE_ABS_ACCESSORS(max, maximum)
INPUT_GENERATE_ABS_ACCESSORS(fuzz, fuzz)
INPUT_GENERATE_ABS_ACCESSORS(flat, flat)
INPUT_GENERATE_ABS_ACCESSORS(res, resolution)
int input_scancode_to_scalar(const struct input_keymap_entry *ke,
unsigned int *scancode);
int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke);
int input_set_keycode(struct input_dev *dev,
const struct input_keymap_entry *ke);
extern struct class input_
* struct ff_device - force-feedback part of an input device
* @upload: Called to upload an new effect into device
* @erase: Called to erase an effect from device
* @playback: Called to request device to start playing specified effect
* @set_gain: Called to set specified gain
* @set_autocenter: Called to auto-center device
* @destroy: called by input core when parent input device is being
* destroyed
* @private: driver-specific data, will be freed automatically
* @ffbit: bitmap of force feedback capabilities truly supported by
* device (not emulated like ones in input_dev-&ffbit)
* @mutex: mutex for serializing access to the device
* @max_effects: maximum number of effects supported by device
* @effects: pointer to an array of effects currently loaded into device
* @effect_owners: ar when file handle owning
* an effect gets closed the effect is automatically erased
* Every force-feedback device must implement upload() and playback()
* erase() is optional. set_gain() and set_autocenter() need
* only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER
* Note that playback(), set_gain() and set_autocenter() are called with
* dev-&event_lock spinlock held and interrupts off and thus may not
struct ff_device {
int (*upload)(struct input_dev *dev, struct ff_effect *effect,
struct ff_effect *old);
int (*erase)(struct input_dev *dev, int effect_id);
int (*playback)(struct input_dev *dev, int effect_id, int value);
void (*set_gain)(struct input_dev *dev, u16 gain);
void (*set_autocenter)(struct input_dev *dev, u16 magnitude);
void (*destroy)(struct ff_device *);
unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
struct ff_effect *
struct file *effect_owners[];
int input_ff_create(struct input_dev *dev, int max_effects);
void input_ff_destroy(struct input_dev *dev);
int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
int input_ff_create_memless(struct input_dev *dev, void *data,
int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
#define KEY_BACK 158 /* AC Back */
这里的值跟上面的XX.kl文件对应
fraemworks/base/core/java/android/view/KeyEvent.java
* Copyright (C) 2006 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package android.
import android.os.P
import android.os.P
import android.text.method.MetaKeyKeyL
import android.util.L
import android.util.S
import android.util.SparseA
import android.util.SparseIntA
import android.view.KeyCharacterM
import android.view.KeyCharacterMap.KeyD
* Object used to report key and button events.
* Each key press is described by a sequence of key events.
A key press
* starts with a key event with {@link #ACTION_DOWN}.
If the key is held
* sufficiently long that it repeats, then the initial down is followed
* additional key events with {@link #ACTION_DOWN} and a non-zero value for
* {@link #getRepeatCount()}.
The last key event is a {@link #ACTION_UP}
* for the key up.
If the key press is canceled, the key up event will have the
* {@link #FLAG_CANCELED} flag set.
* Key events are generally accompanied by a key code ({@link #getKeyCode()}),
* scan code ({@link #getScanCode()}) and meta state ({@link #getMetaState()}).
* Key code constants are defined in this class.
Scan code constants are raw
* device-specific codes obtained from the OS and so are not generally meaningful
* to applications unless interpreted using the {@link KeyCharacterMap}.
* Meta states describe the pressed state of key modifiers
* such as {@link #META_SHIFT_ON} or {@link #META_ALT_ON}.
* Key codes typically correspond one-to-one with individual keys on an input device.
* Many keys and key combinations serve quite different functions on different
* input devices so care must be taken when interpreting them.
Always use the
* {@link KeyCharacterMap} associated with the input device when mapping keys
* to characters.
Be aware that there may be multiple key input devices active
* at the same time and each will have its own key character map.
* As soft input methods can use multiple and inventive ways of inputting text,
* there is no guarantee that any key press on a soft keyboard will generate a key
* event: this is left to the IME's discretion, and in fact sending such events is
* discouraged.
You should never rely on receiving KeyEvents for any key on a soft
* input method.
In particular, the default software keyboard will never send any
* key event to any application targetting Jelly Bean or later, and will only send
* events for some presses of the delete and return keys to applications targetting
* Ice Cream Sandwich or earlier.
Be aware that other software input methods may
* never send key events regardless of the version.
Consider using editor actions
* like {@link android.view.inputmethod.EditorInfo#IME_ACTION_DONE} if you need
* specific interaction with the software keyboard, as it gives more visibility to
* the user as to how your application will react to key presses.
* When interacting with an IME, the framework may deliver key events
* with the special action {@link #ACTION_MULTIPLE} that either specifies
* that single repeated key code or a sequence of characters to insert.
* In general, the framework cannot guarantee that the key events it delivers
* to a view always constitute complete key sequences since some events may be dropped
* or modified by containing views before they are delivered.
The view implementation
* should be prepared to handle {@link #FLAG_CANCELED} and should tolerate anomalous
* situations such as receiving a new {@link #ACTION_DOWN} without first having
* received an {@link #ACTION_UP} for the prior key press.
* Refer to {@link InputDevice} for more information about how different kinds of
* input devices and sources represent keys and buttons.
public class KeyEvent extends InputEvent implements Parcelable {
/** Key code constant: Unknown key code. */
public static final int KEYCODE_UNKNOWN
/** Key code constant: Soft Left key.
* Usually situated below the display on phones and used as a multi-function
* feature key for selecting a software defined function shown on the bottom left
* of the display. */
public static final int KEYCODE_SOFT_LEFT
/** Key code constant: Soft Right key.
* Usually situated below the display on phones and used as a multi-function
* feature key for selecting a software defined function shown on the bottom right
* of the display. */
public static final int KEYCODE_SOFT_RIGHT
/** Key code constant: Home key.
* This key is handled by the framework and is never delivered to applications. */
public static final int KEYCODE_HOME
/** Key code constant: Back key. */
public static final int KEYCODE_BACK
/** Key code constant: Call key. */
public static final int KEYCODE_CALL
/** Key code constant: End Call key. */
public static final int KEYCODE_ENDCALL
/** Key code constant: '0' key. */
public static final int KEYCODE_0
/** Key code constant: '1' key. */
public static final int KEYCODE_1
/** Key code constant: '2' key. */
public static final int KEYCODE_2
/** Key code constant: '3' key. */
public static final int KEYCODE_3
/** Key code constant: '4' key. */
public static final int KEYCODE_4
/** Key code constant: '5' key. */
public static final int KEYCODE_5
/** Key code constant: '6' key. */
public static final int KEYCODE_6
/** Key code constant: '7' key. */
public static final int KEYCODE_7
/** Key code constant: '8' key. */
public static final int KEYCODE_8
/** Key code constant: '9' key. */
public static final int KEYCODE_9
/** Key code constant: '*' key. */
public static final int KEYCODE_STAR
/** Key code constant: '#' key. */
public static final int KEYCODE_POUND
/** Key code constant: Directional Pad Up key.
* May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_UP
/** Key code constant: Directional Pad Down key.
* May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_DOWN
/** Key code constant: Directional Pad Left key.
* May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_LEFT
/** Key code constant: Directional Pad Right key.
* May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_RIGHT
/** Key code constant: Directional Pad Center key.
* May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_CENTER
/** Key code constant: Volume Up key.
* Adjusts the speaker volume up. */
public static final int KEYCODE_VOLUME_UP
/** Key code constant: Volume Down key.
* Adjusts the speaker volume down. */
public static final int KEYCODE_VOLUME_DOWN
/** Key code constant: Power key. */
public static final int KEYCODE_POWER
/** Key code constant: Camera key.
* Used to launch a camera application or take pictures. */
public static final int KEYCODE_CAMERA
/** Key code constant: Clear key. */
public static final int KEYCODE_CLEAR
/** Key code constant: 'A' key. */
public static final int KEYCODE_A
/** Key code constant: 'B' key. */
public static final int KEYCODE_B
/** Key code constant: 'C' key. */
public static final int KEYCODE_C
/** Key code constant: 'D' key. */
public static final int KEYCODE_D
/** Key code constant: 'E' key. */
public static final int KEYCODE_E
/** Key code constant: 'F' key. */
public static final int KEYCODE_F
/** Key code constant: 'G' key. */
public static final int KEYCODE_G
/** Key code constant: 'H' key. */
public static final int KEYCODE_H
/** Key code constant: 'I' key. */
public static final int KEYCODE_I
/** Key code constant: 'J' key. */
public static final int KEYCODE_J
/** Key code constant: 'K' key. */
public static final int KEYCODE_K
/** Key code constant: 'L' key. */
public static final int KEYCODE_L
/** Key code constant: 'M' key. */
public static final int KEYCODE_M
/** Key code constant: 'N' key. */
public static final int KEYCODE_N
/** Key code constant: 'O' key. */
public static final int KEYCODE_O
/** Key code constant: 'P' key. */
public static final int KEYCODE_P
/** Key code constant: 'Q' key. */
public static final int KEYCODE_Q
/** Key code constant: 'R' key. */
public static final int KEYCODE_R
/** Key code constant: 'S' key. */
public static final int KEYCODE_S
/** Key code constant: 'T' key. */
public static final int KEYCODE_T
/** Key code constant: 'U' key. */
public static final int KEYCODE_U
/** Key code constant: 'V' key. */
public static final int KEYCODE_V
/** Key code constant: 'W' key. */
public static final int KEYCODE_W
/** Key code constant: 'X' key. */
public static final int KEYCODE_X
/** Key code constant: 'Y' key. */
public static final int KEYCODE_Y
/** Key code constant: 'Z' key. */
public static final int KEYCODE_Z
/** Key code constant: ',' key. */
public static final int KEYCODE_COMMA

我要回帖

更多关于 4条线是什么牌子 的文章

 

随机推荐