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) | 日記

A better way to bring network up.

Instead of typing in setprop command on Android Zaurus console, put the following line into android-root/etc/default.prop
net.eth0.dns1 = xx.yy.zz.qq

Where xx.yy.zz.qq is IP address of your DNS server, ovbiously.

By the way. Don't forget delete the gateway setting in usb0 interface in /etc/network/interfaces. I still don't get why Angstrom uses this tricky interface as a default gateway.
posted by 安藤恐竜 at 07:20 | Comment(0) | TrackBack(0) | 日記

広告


この広告は60日以上更新がないブログに表示がされております。

以下のいずれかの方法で非表示にすることが可能です。

・記事の投稿、編集をおこなう
・マイブログの【設定】 > 【広告設定】 より、「60日間更新が無い場合」 の 「広告を表示しない」にチェックを入れて保存する。


×

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