Android Hard Keypad

来源:互联网 发布:淘宝和旺信是绑定的吗 编辑:程序博客网 时间:2024/04/29 19:03

1.Hard keyboard's kl andkcm



By KeyEvent.java threre are 92 KEYCODE_XXX events,in fact we just use 41 key(not including POWER key).And we still add a new keycode.This file also define all event caused by key .According to different treatment ,Opal's 41 keys can be divided into three categories: system keys , modifier keys and the others(It's my own summary).The system keys includeKEYCODE_MENUKEYCODE_HOMEKEYCODE_CALLKEYCODE_VOLUME_UPKEYCODE_VOLUME_DOWN, KEYCODE_SEARCH (KEYCODE_CAMERA, KEYCODE_FOCUS and so on).These keys are function keys as their names.The modifier keys include: ALT_LEFT, SHIFT_LEFT.In fact the full keyboard include : ALT_LEFT,ALT_RIGHT, SHIFT_LEFT,SHIFT_RIGHT and SYM.They are boolean type ,by judging the isAltPressed()isShiftPressed()isSymPressed() to make sure these keys whether are pressed.These keys are normally used combination with A~Z SPACE key and navigation keys.The ALT key can lock up-half character; the SHIFT key can lock the capital letters; the SYM key(if have this key) can access to all symbol screen and swith the IME.


Kl stand for key layout,it default file is qwerty.kl .It contains all keys' mapping between scancode and keycode.If we don't define any kl file ,the system will call this file ,and its path is /system/usr/keylayout/qwerty.kl in the handset.Usually we difine the KL files according to the actual keyboard layout on the phone.As follows there are several  hard keyboard layouts:QWERTY+EURO,AZERTY+EURO and QWERTY+Russian.The kind of the hard keypad is due to the alphabetical and dallor symbols. In fact Opal has 6 sets of keyboard : qwerty + $, qwerty + €, azerty + €, qwertz + €, qwerty+Russian, qwerty + £.

 

 


 

 

原创粉丝点击