精华 | |
金钱 | BA |
威望 | 点 |
贡献值 | 点 |
爱心 | 点 |
经验 | 点 |
注册时间 | 2009-12-7 |
最后登录 | 1970-1-1 |
在线时间 | 小时 |
| |
| |
| |
|
立即注册,加入爱黑武论坛的大家庭!爱黑武,爱上搞机生活!
您需要 登录 才可以下载或查看,没有账号?注册
x
转载自:Android开发网原创
很多开发者表示不知道如何在Android的layout布局文件中输入类似&这样的符号,下面Android123整理了下一些案件事件映射和转义符对照表,比如说 & 在layout.xml中应该\uff06同时,从下表可以看到&和7在键盘上是同一个位置。
- KeyEvent.KEYCODE_UNKNOWN,
- KeyEvent.KEYCODE_SOFT_LEFT,
- KeyEvent.KEYCODE_SOFT_RIGHT,
- KeyEvent.KEYCODE_HOME,
复制代码
- KeyEvent.KEYCODE_BACK,
- KeyEvent.KEYCODE_CALL,
- KeyEvent.KEYCODE_ENDCALL,
- KeyEvent.KEYCODE_0 | ('\uff09' << SHIFT_FWCH), // )
- KeyEvent.KEYCODE_1 | ('\uff01' << SHIFT_FWCH), // !
- KeyEvent.KEYCODE_2 | ('\uff20' << SHIFT_FWCH), // @
- KeyEvent.KEYCODE_3 | ('\uff03' << SHIFT_FWCH), // #
- KeyEvent.KEYCODE_4 | ('\uffe5' << SHIFT_FWCH), // $ - fullwidth Yuan
- KeyEvent.KEYCODE_5 | ('\uff05' << SHIFT_FWCH), // %
- KeyEvent.KEYCODE_6 | ('\u2026' << SHIFT_FWCH), // ^ - Apostrophe
- KeyEvent.KEYCODE_7 | ('\uff06' << SHIFT_FWCH), // &
- KeyEvent.KEYCODE_8 | ('\uff0a' << SHIFT_FWCH), // *
- KeyEvent.KEYCODE_9 | ('\uff08' << SHIFT_FWCH), // (
- KeyEvent.KEYCODE_STAR,
- KeyEvent.KEYCODE_POUND,
- KeyEvent.KEYCODE_DPAD_UP,
- KeyEvent.KEYCODE_DPAD_DOWN,
- KeyEvent.KEYCODE_DPAD_LEFT,
- KeyEvent.KEYCODE_DPAD_RIGHT,
- KeyEvent.KEYCODE_DPAD_CENTER,
- KeyEvent.KEYCODE_VOLUME_UP,
- KeyEvent.KEYCODE_VOLUME_DOWN,
- KeyEvent.KEYCODE_POWER,
- KeyEvent.KEYCODE_CAMERA,
- KeyEvent.KEYCODE_CLEAR,
- KeyEvent.KEYCODE_A,
- KeyEvent.KEYCODE_B | ('\uff3d' << SHIFT_FWCH), // ]
- KeyEvent.KEYCODE_C | ('\u00a9' << SHIFT_FWCH), // copyright
- KeyEvent.KEYCODE_D | ('\u3001' << SHIFT_FWCH), // \\
- KeyEvent.KEYCODE_E | ('_' << SHIFT_FWCH), // _
- KeyEvent.KEYCODE_F | ('\uff5b' << SHIFT_FWCH), // {
- KeyEvent.KEYCODE_G | ('\uff5d' << SHIFT_FWCH), // }
- KeyEvent.KEYCODE_H | ('\uff1a' << SHIFT_FWCH), // :
- KeyEvent.KEYCODE_I | ('\uff0d' << SHIFT_FWCH), // -
- KeyEvent.KEYCODE_J | ('\uff1b' << SHIFT_FWCH), // ;
- KeyEvent.KEYCODE_K | ('\u201c' << SHIFT_FWCH), // "
- KeyEvent.KEYCODE_L | ('\u2019' << SHIFT_FWCH), // '
- KeyEvent.KEYCODE_M | ('\u300b' << SHIFT_FWCH), // > - French quotes
- KeyEvent.KEYCODE_N | ('\u300a' << SHIFT_FWCH), // < - French quotes
- KeyEvent.KEYCODE_O | ('\uff0b' << SHIFT_FWCH), // +
- KeyEvent.KEYCODE_P | ('\uff1d' << SHIFT_FWCH), // =
- KeyEvent.KEYCODE_Q | ('\t' << SHIFT_FWCH), // \t
- KeyEvent.KEYCODE_R | ('\u00ae' << SHIFT_FWCH), // trademark
- KeyEvent.KEYCODE_S | ('\uff5c' << SHIFT_FWCH), // |
- KeyEvent.KEYCODE_T | ('\u20ac' << SHIFT_FWCH), //
- KeyEvent.KEYCODE_U | ('\u00d7' << SHIFT_FWCH), // multiplier
- KeyEvent.KEYCODE_V | ('\uff3b' << SHIFT_FWCH), // [
- KeyEvent.KEYCODE_W | ('\uff40' << SHIFT_FWCH), // `
- KeyEvent.KEYCODE_X, KeyEvent.KEYCODE_Y | ('\u00f7' << SHIFT_FWCH),
- KeyEvent.KEYCODE_Z,
- KeyEvent.KEYCODE_COMMA | ('\uff1f' << SHIFT_FWCH),
- KeyEvent.KEYCODE_PERIOD | ('\uff0f' << SHIFT_FWCH),
- KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_ALT_RIGHT,
- KeyEvent.KEYCODE_SHIFT_LEFT, KeyEvent.KEYCODE_SHIFT_RIGHT,
- KeyEvent.KEYCODE_TAB, KeyEvent.KEYCODE_SPACE, KeyEvent.KEYCODE_SYM,
- KeyEvent.KEYCODE_EXPLORER, KeyEvent.KEYCODE_ENVELOPE,
- KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_DEL,
- KeyEvent.KEYCODE_GRAVE, KeyEvent.KEYCODE_MINUS,
- KeyEvent.KEYCODE_EQUALS, KeyEvent.KEYCODE_LEFT_BRACKET,
- KeyEvent.KEYCODE_RIGHT_BRACKET, KeyEvent.KEYCODE_BACKSLASH,
- KeyEvent.KEYCODE_SEMICOLON, KeyEvent.KEYCODE_APOSTROPHE,
- KeyEvent.KEYCODE_SLASH,
- KeyEvent.KEYCODE_AT | ('\uff5e' << SHIFT_FWCH),
- KeyEvent.KEYCODE_NUM, KeyEvent.KEYCODE_HEADSETHOOK,
- KeyEvent.KEYCODE_FOCUS, KeyEvent.KEYCODE_PLUS,
- KeyEvent.KEYCODE_MENU, KeyEvent.KEYCODE_NOTIFICATION,
- KeyEvent.KEYCODE_SEARCH
复制代码
|
|