HTC Desire Z hardware keyboard

For anything else related to Smart Keyboard
SimWhite
Posts: 10
Joined: Thu Jan 27, 2011 10:30 am
Phone: HTC Desire Z, Android 2.2
Location: Internet
Contact:

HTC Desire Z hardware keyboard

Post by SimWhite »

Hi all, I need advice. Now I must to use combination Shift+Space to change language with hardware keyboard on my Desire Z, how can I use hardware button "Language"?
User avatar
cyril
Developer
Posts: 2079
Joined: Tue Feb 02, 2010 4:02 pm
Phone: Nexus One 2.3
Location: Nice, France

Re: HTC Desire Z hardware keyboard

Post by cyril »

You cannot use this button at the moment, as it's specific to this phone.

Sent from my Nexus One using Tapatalk
Cyril
SimWhite
Posts: 10
Joined: Thu Jan 27, 2011 10:30 am
Phone: HTC Desire Z, Android 2.2
Location: Internet
Contact:

Re: HTC Desire Z hardware keyboard

Post by SimWhite »

This feature can be implemented in future releases?
lexunus
Posts: 13
Joined: Wed Feb 02, 2011 10:30 pm

Re: HTC Desire Z hardware keyboard

Post by lexunus »

+1
I would second this request to add language switch feature to hardware keyboards.
This should be a common request - there're lots of people with rooted phones and custom ROMs that still require dual language support on their Milestones, G1 and G2 \ Desire Z phones with hard keyboard.
Yet there's only one app on the market to suite the Russian-only community - http://www.appbrain.com/app/russian-key ... rukeyboard, but it has terrible portrait keyboard design.
So I'll by Smart KB as soon as you'll get this feature.
User avatar
cyril
Developer
Posts: 2079
Joined: Tue Feb 02, 2010 4:02 pm
Phone: Nexus One 2.3
Location: Nice, France

Re: HTC Desire Z hardware keyboard

Post by cyril »

lexunus wrote:This should be a common request - there're lots of people with rooted phones and custom ROMs that still require dual language support on their Milestones, G1 and G2 \ Desire Z phones with hard keyboard.
You are talking about something else: it's already possible to change the language on every phone using the shift + space combination. What this topic is about is to support the special "language" key which is present on the Desire Z.
Cyril
SimWhite
Posts: 10
Joined: Thu Jan 27, 2011 10:30 am
Phone: HTC Desire Z, Android 2.2
Location: Internet
Contact:

Re: HTC Desire Z hardware keyboard

Post by SimWhite »

Cyril, what about my question of future releases?
User avatar
cyril
Developer
Posts: 2079
Joined: Tue Feb 02, 2010 4:02 pm
Phone: Nexus One 2.3
Location: Nice, France

Re: HTC Desire Z hardware keyboard

Post by cyril »

There are 2 requirements to implement this feature:
- The keyboard must receive an event when this key is pressed (knowing HTC, it's not sure they made this available outside of their own keyboard app)
- I need to known the key code of this language key. If you want to help, you can enable the debug logs in advanced options, and look for lines beginning with "keyCode: " in your phone logs (which you can get with "Log Collector" app or "adb logcat" command). If the event is received by the keyboard, you should be able to identify which code corresponds to this key, otherwise the feature will be more difficult to implement (though not impossible)
Cyril
lexunus
Posts: 13
Joined: Wed Feb 02, 2011 10:30 pm

Re: HTC Desire Z hardware keyboard

Post by lexunus »

cyril wrote:it's already possible to change the language on every phone using the shift + space combination. What this topic is about is to support the special "language" key which is present on the Desire Z.
OMG, yes, it really works for me, thanks! I was in search for that kind of keyboard for a week already. Just bought the Smart Keyboard, it's really amazing.

Having a special "language" key mapping would be a pleasant supplement, but I can perfectly live with Shift+Space combo.
BTW, key remapping would be really cool if you manage to build it, we have some useless hardware buttons that could be mapped to dots, periods, lang switches, etc.

Thanks
lexunus
Posts: 13
Joined: Wed Feb 02, 2011 10:30 pm

Re: HTC Desire Z hardware keyboard

Post by lexunus »

cyril wrote:I need to known the key code of this language key. If you want to help, you can enable the debug logs in advanced options, and look for lines beginning with "keyCode: " in your phone logs (which you can get with "Log Collector" app or "adb logcat" command). If the event is received by the keyboard, you should be able to identify which code corresponds to this key, otherwise the feature will be more difficult to implement (though not impossible)
Done. It's keyCode 99. It's not button "X", which returns code 52.

Here's an extract from dev docs. What really shocks me is that this damn button is only since API Level !! 9 !!:

Public static final int KEYCODE_BUTTON_X
Since: API Level 9
Key code constant: X Button key. On a game controller, the X button should be either the button labeled X or the first button on the lower row of controller buttons.
Constant Value: 99 (0x00000063)
SimWhite
Posts: 10
Joined: Thu Jan 27, 2011 10:30 am
Phone: HTC Desire Z, Android 2.2
Location: Internet
Contact:

Re: HTC Desire Z hardware keyboard

Post by SimWhite »

lexunus wrote:BTW, key remapping would be really cool if you manage to build it, we have some useless hardware buttons that could be mapped to dots, periods, lang switches, etc.
+1
For example map user button for "?/!" really need at russian layout.
Post Reply