Android KeyCode对照表

这个文档详细列举了各种设备按键的代码,包括从基本的键盘按键到游戏控制器、电视遥控器上的特殊功能键,涵盖了从Android系统到多媒体播放的各种应用场景。

0 --> “KEYCODE_UNKNOWN”
1 --> “KEYCODE_MENU”
2 --> “KEYCODE_SOFT_RIGHT”
3 --> “KEYCODE_HOME”
4 --> “KEYCODE_BACK”
5 --> “KEYCODE_CALL”
6 --> “KEYCODE_ENDCALL”
7 --> “KEYCODE_0”
8 --> “KEYCODE_1”
9 --> “KEYCODE_2”
10 --> “KEYCODE_3”
11 --> “KEYCODE_4”
12 --> “KEYCODE_5”
13 --> “KEYCODE_6”
14 --> “KEYCODE_7”
15 --> “KEYCODE_8”
16 --> “KEYCODE_9”
17 --> “KEYCODE_STAR”
18 --> “KEYCODE_POUND”
19 --> “KEYCODE_DPAD_UP”
20 --> “KEYCODE_DPAD_DOWN”
21 --> “KEYCODE_DPAD_LEFT”
22 --> “KEYCODE_DPAD_RIGHT”
23 --> “KEYCODE_DPAD_CENTER”
24 --> “KEYCODE_VOLUME_UP”
25 --> “KEYCODE_VOLUME_DOWN”
26 --> “KEYCODE_POWER”
27 --> “KEYCODE_CAMERA”
28 --> “KEYCODE_CLEAR”
29 --> “KEYCODE_A”
30 --> “KEYCODE_B”
31 --> “KEYCODE_C”
32 --> “KEYCODE_D”
33 --> “KEYCODE_E”
34 --> “KEYCODE_F”
35 --> “KEYCODE_G”
36 --> “KEYCODE_H”
37 --> “KEYCODE_I”
38 --> “KEYCODE_J”
39 --> “KEYCODE_K”
40 --> “KEYCODE_L”
41 --> “KEYCODE_M”
42 --> “KEYCODE_N”
43 --> “KEYCODE_O”
44 --> “KEYCODE_P”
45 --> “KEYCODE_Q”
46 --> “KEYCODE_R”
47 --> “KEYCODE_S”
48 --> “KEYCODE_T”
49 --> “KEYCODE_U”
50 --> “KEYCODE_V”
51 --> “KEYCODE_W”
52 --> “KEYCODE_X”
53 --> “KEYCODE_Y”
54 --> “KEYCODE_Z”
55 --> “KEYCODE_COMMA”
56 --> “KEYCODE_PERIOD”
57 --> “KEYCODE_ALT_LEFT”
58 --> “KEYCODE_ALT_RIGHT”
59 --> “KEYCODE_SHIFT_LEFT”
60 --> “KEYCODE_SHIFT_RIGHT”
61 --> “KEYCODE_TAB”
62 --> “KEYCODE_SPACE”
63 --> “KEYCODE_SYM”
64 --> “KEYCODE_EXPLORER”
65 --> “KEYCODE_ENVELOPE”
66 --> “KEYCODE_ENTER”
67 --> “KEYCODE_DEL”
68 --> “KEYCODE_GRAVE”
69 --> “KEYCODE_MINUS”
70 --> “KEYCODE_EQUALS”
71 --> “KEYCODE_LEFT_BRACKET”
72 --> “KEYCODE_RIGHT_BRACKET”
73 --> “KEYCODE_BACKSLASH”
74 --> “KEYCODE_SEMICOLON”
75 --> “KEYCODE_APOSTROPHE”
76 --> “KEYCODE_SLASH”
77 --> “KEYCODE_AT”
78 --> “KEYCODE_NUM”
79 --> “KEYCODE_HEADSETHOOK”
80 --> “KEYCODE_FOCUS”
81 --> “KEYCODE_PLUS”
82 --> “KEYCODE_MENU”
83 --> “KEYCODE_NOTIFICATION”
84 --> “KEYCODE_SEARCH”
85 --> "TAG_LAST_KEYCODE

/** Key code constant: Unknown key code. /
public static final int KEYCODE_UNKNOWN = 0;
/
* 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 = 1;
/
* 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 = 2;
/
* Key code constant: Home key.
* This key is handled by the framework and is never delivered to applications. /
public static final int KEYCODE_HOME = 3;
/
* Key code constant: Back key. /
public static final int KEYCODE_BACK = 4;
/
* Key code constant: Call key. /
public static final int KEYCODE_CALL = 5;
/
* Key code constant: End Call key. /
public static final int KEYCODE_ENDCALL = 6;
/
* Key code constant: ‘0’ key. /
public static final int KEYCODE_0 = 7;
/
* Key code constant: ‘1’ key. /
public static final int KEYCODE_1 = 8;
/
* Key code constant: ‘2’ key. /
public static final int KEYCODE_2 = 9;
/
* Key code constant: ‘3’ key. /
public static final int KEYCODE_3 = 10;
/
* Key code constant: ‘4’ key. /
public static final int KEYCODE_4 = 11;
/
* Key code constant: ‘5’ key. /
public static final int KEYCODE_5 = 12;
/
* Key code constant: ‘6’ key. /
public static final int KEYCODE_6 = 13;
/
* Key code constant: ‘7’ key. /
public static final int KEYCODE_7 = 14;
/
* Key code constant: ‘8’ key. /
public static final int KEYCODE_8 = 15;
/
* Key code constant: ‘9’ key. /
public static final int KEYCODE_9 = 16;
/
* Key code constant: ‘’ key. /
public static final int KEYCODE_STAR = 17;
/
* Key code constant: ‘#’ key. /
public static final int KEYCODE_POUND = 18;
/
* Key code constant: Directional Pad Up key.
* May also be synthesized from trackball motions. /
public static final int KEYCODE_DPAD_UP = 19;
/
* Key code constant: Directional Pad Down key.
* May also be synthesized from trackball motions. /
public static final int KEYCODE_DPAD_DOWN = 20;
/
* Key code constant: Directional Pad Left key.
* May also be synthesized from trackball motions. /
public static final int KEYCODE_DPAD_LEFT = 21;
/
* Key code constant: Directional Pad Right key.
* May also be synthesized from trackball motions. /
public static final int KEYCODE_DPAD_RIGHT = 22;
/
* Key code constant: Directional Pad Center key.
* May also be synthesized from trackball motions. /
public static final int KEYCODE_DPAD_CENTER = 23;
/
* Key code constant: Volume Up key.
* Adjusts the speaker volume up. /
public static final int KEYCODE_VOLUME_UP = 24;
/
* Key code constant: Volume Down key.
* Adjusts the speaker volume down. /
public static final int KEYCODE_VOLUME_DOWN = 25;
/
* Key code constant: Power key. /
public static final int KEYCODE_POWER = 26;
/
* Key code constant: Camera key.
* Used to launch a camera application or take pictures. /
public static final int KEYCODE_CAMERA = 27;
/
* Key code constant: Clear key. /
public static final int KEYCODE_CLEAR = 28;
/
* Key code constant: ‘A’ key. /
public static final int KEYCODE_A = 29;
/
* Key code constant: ‘B’ key. /
public static final int KEYCODE_B = 30;
/
* Key code constant: ‘C’ key. /
public static final int KEYCODE_C = 31;
/
* Key code constant: ‘D’ key. /
public static final int KEYCODE_D = 32;
/
* Key code constant: ‘E’ key. /
public static final int KEYCODE_E = 33;
/
* Key code constant: ‘F’ key. /
public static final int KEYCODE_F = 34;
/
* Key code constant: ‘G’ key. /
public static final int KEYCODE_G = 35;
/
* Key code constant: ‘H’ key. /
public static final int KEYCODE_H = 36;
/
* Key code constant: ‘I’ key. /
public static final int KEYCODE_I = 37;
/
* Key code constant: ‘J’ key. /
public static final int KEYCODE_J = 38;
/
* Key code constant: ‘K’ key. /
public static final int KEYCODE_K = 39;
/
* Key code constant: ‘L’ key. /
public static final int KEYCODE_L = 40;
/
* Key code constant: ‘M’ key. /
public static final int KEYCODE_M = 41;
/
* Key code constant: ‘N’ key. /
public static final int KEYCODE_N = 42;
/
* Key code constant: ‘O’ key. /
public static final int KEYCODE_O = 43;
/
* Key code constant: ‘P’ key. /
public static final int KEYCODE_P = 44;
/
* Key code constant: ‘Q’ key. /
public static final int KEYCODE_Q = 45;
/
* Key code constant: ‘R’ key. /
public static final int KEYCODE_R = 46;
/
* Key code constant: ‘S’ key. /
public static final int KEYCODE_S = 47;
/
* Key code constant: ‘T’ key. /
public static final int KEYCODE_T = 48;
/
* Key code constant: ‘U’ key. /
public static final int KEYCODE_U = 49;
/
* Key code constant: ‘V’ key. /
public static final int KEYCODE_V = 50;
/
* Key code constant: ‘W’ key. /
public static final int KEYCODE_W = 51;
/
* Key code constant: ‘X’ key. /
public static final int KEYCODE_X = 52;
/
* Key code constant: ‘Y’ key. /
public static final int KEYCODE_Y = 53;
/
* Key code constant: ‘Z’ key. /
public static final int KEYCODE_Z = 54;
/
* Key code constant: ‘,’ key. /
public static fin

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

言并肃

感谢大哥支持!您的鼓励是我动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值