12/26/2007

Portrait/Landscape and Keycode

To rotate from portrait view to landscape view, I found this hack in the Android Developers Group.
# service call window 18 i32 1


To make the keyboard work more nicely, I wrote a short applet to check key events. Scan codes of special keys are
    Keyboard 
    OK87
    Cancel62
    Menu88
    Home99
    Mail66
    Call59
    Fn61
    Space57
    Side Key 
    OK63
    Cancel64
    Up66
    Down65


I add following lines to andriod-root/system/usr/keylayout/qwerty.kl. Well, tentatively.
key 108 DPAD_LEFT
key 103 DPAD_RIGHT
key 105 DPAD_UP
key 106 DPAD_DOWN
key 87 DPAD_CENTER
key 62 BACK
key 88 SOFT_LEFT
key 99 HOME
key 68 ENVELOPE
key 59 EXPLORER
key 63 DPAD_CENTER
key 64 BACK
key 66 VOLUME_UP
key 65 VOLUME_DOWN
key 57 SPACE
key 61 FN


This is not perfect at all. The layout is English keyboard and my Android Zaurus has a Japanese keyboard. Also, Fn-markup does't work. May need to build android-root/system/usr/keychars/zaurus.kcm.bin. I don't know how yet, though.

Next thing is touch pannel. Sometimes it works. Next moment, it doesn't. Very unstable.
posted by 安藤恐竜 at 19:03 | Comment(1) | TrackBack(0) | 日記
Comments for this entry
Hi, could I get a copy of your applet to check keyboard events?

Did those key codes actually work for you? I'm trying to do the same for the touch dual.

Thanks a lot!
Posted by Joshua Chang at 06/08/2008 07:31
Leave your comment
Name: [Must]

EMail: [Must]

URL: [Must]

Comment: [Must]

Confirmation Code: [Must]


Type in alphabets what you see in this image.
Trackback URI:  http://blog.seesaa.jp/tb/74790292
Trackback entries must contain URL of this entry.

Trackbacks to this entry
×

この広告は1年以上新しい記事の投稿がないブログに表示されております。