[Q] Keyboard app development (for Physical Keyboard) - Android Q&A, Help & Troubleshooting

Hey guys,
So I have bought a Huawei Boulder (U6350 also called orange barselona), so when you write a text message, if you hold certain key (for example a) it gives me a choice between characters similar to what you pressed (for example ą, ä, ã, á, à or something like that), but certain keys doesn't give appropriate characters for my language (for example ė, į, ų), so I decided to create my own keyboard app, that will support this physical keyboard and when I hold it or press twice or 3 times in a row, it will give me characters I need, but here is the problem: I don't know how :/. I know how to set up adb, eclipse etc. it's just I don't know how to create keyboard app, and also how to make that app compatible with my phones physical keyboard.
Thanks for your answer.
Simonas.

Related

Hardware keyboard translation for HP 600, Touch Dual, Asus p750

Hi ,
I have written a small application:
http://rapidshare.com/files/125258935/HebKeys_tog198.CAB.html
This application is designed for window mobile 6 devices that has a numeric keyboard,
one of the problems with this type of devices is that there isn't language support for them, for example if you want to write sms in hebrew or russion using this keyboard it is impossible.
After installing this application a XML file (layout.xml) will be coppied to your device containning all the translation of the keyboard. (this xml is configure to HP 600 !!! it will not work on other devices)
The xml file contains group of hardware keys (for example):
<keys>
<HWcode>48</HWcode>
<state1>0</state1>
<state2>ך</state2>
<state3>ן</state3>
<state4>ף</state4>
</keys>
in this example hardware key 48 will contain the following signs: 0-zero, "ך" - hebrew sign, "ן" - another hebrew sign, "ף" and another hebrew sign.
clicking on hardware key 48 (0 in the hardware keyboard of the hp 600) will itirate between does "states".
This application will run in the background, for toggeling it's translation use your Voice button (key 198) or configure it to different button:
<tog>
<HWcode>198</HWcode>
</tog>
you can of course configure yourself the signes and hardware keys to mach your device.
I written another application in order to help you find what is the hardware code for every key in your device:
http://rapidshare.com/files/125091730/KeyMap_13.zip.html
this two applications will not run together, so make sure you are closing one before running the other (SR is also agood idea).
Pls backup all your data before installing the applications.
link to the original thread (hebrew):
http://www.pocketpcfreak.com/cgi-bin/yabb/YaBB.cgi?board=Himalaya;action=display;num=1214408412
have fun
Rani
HW keyboard working on 3rd party apps in Dual
Great news to those using Touch Dual with 20keys and are fustrated with the HW keyboard typing only numbers on 3rd party apps (like Opera, Google Search etc.) - this HebKeys app by Golum can provide a reasonable solution.
Limitations:
- No XT9.
- No Shift or Capital letters.
- No symbol window access (SYM is not active).
- Long delay is required in words that have two consequent letters mapped to the same key (e.g. REad, because R and E are on the same key). Alternatively, if an unmapped key is pressed (SYM), you can re-press the key again and get the next letter.
BTW, Golum promised to provide an update with an option to update the value of this delay through an xml file.
How to install:
1. download the HebKeys app by Golum, from http://rapidshare.com/files/125260462/HebKeys_button198.CAB.html
2. download the following key mapping layout that I have created: http://www.4shared.com/file/52928436...55/layout.html
3. after installing the app, replace the layout.xml file in the app folder (under Program Files) with the layout.xml file that you downloaded in 2.
Now what you need is to run the installed app and the re-mapping is done (need to re-run it after soft-reset).
If you run the app after it was activated, you can stop it using the "Exit" button. BTW, it is possible that the link above by Golum is for a slightly different version than the one in the link I provided, in which the default when running the app is the "unmapped keyboard" and there's no option to exit (no Exit button). Golum? I personally prefer the one with the Exit option.
If you wish to play with the mapping layout, you can edit the XML yourself. It is quite readable. Notice you cannot put less than 4 options (representing 4 repeating presses) to each key.
The last key mapped is for toggling the mapping on and off (the app is still in the background). Default is the ALT key.
The mapping of the HW keys of the 20key Dual is as follows (in the order it appears on the keyboard):
81 49 50 51 79
65 52 53 54 76
90 55 56 57 8
236 119 48 120 13
If you have a different device, you can try the key mapping app in the link from my previous post, to get the mapping.
Regarding Hebrew:
The layout file that I have provided solves the keyboard problem, but replaces the Hebrew support in the original layout included with the HebKeys app. However, I found that if you have Eyron Hebrew support installed, when the HebKeys is activated and you switch to Hebrew in the Eyron soft keyboard you can use the keyboard to write Hebrew!
If you think you managed to improve it, added the Shift or Sym functionality etc. - please share with all.
Enjoy.
Update:
Please note that I have updated the layout.xml a little, so if you already downloaded it - please re-download and re-copy to the proper folder.
If you really insist to know why I udpdated:
I found out the key I used for space is actually &NBSP, which seems like a space but is not exactly a space.
For some reason putting merely a space character in the XML does not work (not recognized, probably removed by the XML interpreter), so I added a NULL character afterwards, to turn it into a significant space.
Great App, seems to be the most awaited fix for the XDA Stealth keypad. Thanks GOLUM.
- Long delay is required in words that have two consequent letters mapped to the same key (e.g. REad, because R and E are on the same key). Alternatively, if an unmapped key is pressed (SYM), you can re-press the key again and get the next letter.
BTW, Golum promised to provide an update with an option to update the value of this delay through an xml file.
Click to expand...
Click to collapse
Is it possible to use the joystick or navigation pad (right) to be able to move the cursor right away to type the next character? I used to do this on my Nokia days before.
and by the way, is there anyway to do a toogle with this one for enabling and disabling? i mean there would be a toggle that would enable this and use your configured XML as the layout then a toggle OFF to use the default or original keyboard layout. That would be awesome!
The cursor key may not be the greatest idea, as it also functions to move the curser around. It depends on the application - in some it will give you exactly what you want, in others it will move away from the location of the next word.
An alternative option is to use an unmapped key or one that is mapped to nothing, as I explained (I use SYM).
Reg toggle - as explained in the posts the last key in the layout.xml is the toggle key definition. Default is ALT.
Please note that I have updated the layout.xml a little.
If you really insist to know why I udpdated:
I found out the key I used for space is actually &NBSP, which seems like a space but is not exactly a space.
For some reason putting merely a space character in the XML does not work (not recognized, probably removed by the XML interpreter), so I added a NULL character afterwards, to turn it into a significant space.
can u provide this too on xda stealth?
Space
I cannot make a space?
HOw should I write it in text editor?
Pls Help!
space
"space" works with "0"-button, without <HWcode>48</HWcode>... in layout.xml
suggestion
tried this on my stealth, with the Layout.xml file changed to a regular eng to replace the multitap on my stealth, so far it's working fine with the exception of only 4 characters assignment on each hardware keys.. Can the maker or someone set the assignment to 5 char per key so we can accomodate the letters and number for 7 and 9..
WOW AWESOME!!
it is working properly on my stealth..
now i can write a message faster than before..
Thanks a Lot GOLUM
hopefully it can 5 char/key on the next release..
can someone plz upload the layout file for the touch dual again?
tnx

Using physical keyboard to type accented words

Ok, so I've been searching around and trying different things but I still cannot get this to work like I expected: how can I use the physical keyboard on my Prime to type accented words without changing the keyboard layout?
On Windows I can get this done easily if I configure my keyboard layout as "US-International" and the input language as "Portuguese (Brazil)" (which is the language I want to type in). This way, when I press the single quote key, for instance, the system waits for the next typed letter to decide what to do: if I type a letter which accepts an accent (such as "a"), Windows will add the letter with the accent (in this case, "á"), otherwise it will just add the single quote.
On my Prime, if I change the default input language of the ASUS keyboard to Portuguese, I am able to type accented words but the keyboard layout is also changed to the Brazilian standard. This causes a problem: the positions of some keys are changed (about 8 of them). I could memorize the new positions of the keys, this would be fine except for the fact that I can't type question marks or slashes with this layout! (at least I didn't find any way to do so)
Then I tried using Swiftkey X, if I choose that as the default input method (with the Brazilian Portuguese dictionary enabled) and type using the physical keyboard I don't even need to type the accents because the auto-correct feature takes care of that for me, this is very good but there are some problems with this method:
- When typing question marks or exclamation points at the end of the sentences, the last word in the sentence ends up getting capitalized since I need to hold the "Shift" key to type those marks (I can work around this problem by typing the word, then a space and then the question mark or exclamation).
- If I need to type a word which is only one accented letter, depending on what the prediction engine does I might have to manually choose the right prediction by touching the screen (it gets the job done, but it's a little annoying). We have a few words like this in Portuguese, such as the word "é" which is used often (it means "is", while the word "e" means "and", that's why the prediction engine might suggest either of them).
Anyway, hopefully you guys understand the problem and have a good suggestion for me.
Currently I think the best solution is to use Swiftkey X and live with the small annoyances I mentioned (I'll e-mail them and maybe suggest they make improvements for this), but does anyone know of any other way I could make the physical keyboard on my Prime behave like the one on my Windows laptop?
Thanks in advance!
I re-posted this on the Q&A section (because that seems to be the correct one), please delete this thread and sorry about that
I don't know if this helps, but in Spanish, if you use a different software keyboard (like Swype, or others), this breaks the configuration of the physical keyboard and you can't use special spanish keys like Ñ. The solution is to root the device and edit a system file.
By the way, my keyboard is localized to spanish language, so I have no problems with it. Is your keyboard localized to portuguese?
Do you mean my physical keyboard? It's the US version, if I try to type "é" like I do in Windows (I type the single quote " ' " and then " e "), I end up getting " 'e ".
If I switch the language of the ASUS keyboard to Portuguese, it works like in Windows but there's the problem of the remapped key layout.
I read about the rooting solution you mentioned, perhaps that might work if I use it with the ASUS keyboard configured for Portuguese, I could change the layout to match that of the US keyboard. Problem is, I just bought the tablet and I'd lose my warranty, or is there a way to unroot it if I needed to?
Maybe you could type those letters by entering their ascii code.
I don't know if there's an unroot method, you should check in the development forums.
intre said:
Maybe you could type those letters by entering their ascii code.
I don't know if there's an unroot method, you should check in the development forums.
Click to expand...
Click to collapse
That's a good suggestion, but I don't know if it would be too practical since quite a lot of words in portuguese use accented letters, but thanks anyway!
I think I'll root my Prime and then use the ASUS Portuguese keyboard with remapped keys...

[Q] Using physical keyboard to type accented words

Ok, so I've been searching around and trying different things but I still cannot get this to work like I expected: how can I use the physical keyboard on my Prime to type accented words without changing the keyboard layout?
On Windows I can get this done easily if I configure my keyboard layout as "US-International" and the input language as "Portuguese (Brazil)" (which is the language I want to type in). This way, when I press the single quote key, for instance, the system waits for the next typed letter to decide what to do: if I type a letter which accepts an accent (such as "a"), Windows will add the letter with the accent (in this case, "á"), otherwise it will just add the single quote.
On my Prime, if I change the default input language of the ASUS keyboard to Portuguese, I am able to type accented words but the keyboard layout is also changed to the Brazilian standard. This causes a problem: the positions of some keys are changed (about 8 of them). I could memorize the new positions of the keys, this would be fine except for the fact that I can't type question marks or slashes with this layout! (at least I didn't find any way to do so)
Then I tried using Swiftkey X, if I choose that as the default input method (with the Brazilian Portuguese dictionary enabled) and type using the physical keyboard I don't even need to type the accents because the auto-correct feature takes care of that for me, this is very good but there are some problems with this method:
- When typing question marks or exclamation points at the end of the sentences, the last word in the sentence ends up getting capitalized since I need to hold the "Shift" key to type those marks (I can work around this problem by typing the word, then a space and then the question mark or exclamation).
- If I need to type a word which is only one accented letter, depending on what the prediction engine does I might have to manually choose the right prediction by touching the screen (it gets the job done, but it's a little annoying). We have a few words like this in Portuguese, such as the word "é" which is used often (it means "is", while the word "e" means "and", that's why the prediction engine might suggest either of them).
Anyway, hopefully you guys understand the problem and have a good suggestion for me.
Currently I think the best solution is to use Swiftkey X and live with the small annoyances I mentioned (I'll e-mail them and maybe suggest they make improvements for this), but does anyone know of any other way I could make the physical keyboard on my Prime behave like the one on my Windows laptop?
Thanks in advance!

[Q] Keyboard problems

Ok, so I recently downloaded an APK for AI. Keyboard after which I started having problems. When I press the backspace it uses other keys like. When I press it doesn't delete but instead puts another letter like "p" and happens with other keys too. Also at time I go into settings and press on certain options such as Language & Keyboard it reverts to applications or sound settings. I don't know if this is a virus or anything. Does anyone know at all about something like this.
reckoning the keyboard app to be beta, you should post the issue in relevant forum in the keyboard app site.

[Q] Remove extra languages on keyboard?

I just updated my note 2 to the Android 4.3 and now my standard keyboard has made it almost impossible to put in any special characters without hitting some other language character as well. For example, trying to put in a parentheses by holding down the "k" key also pulls up a menu for "ķ" or the ")" input has "ł ľ ļ ĺ". It's aggravating as crap when you try and text and random language characters get put in your message instead of the intended character. Is there a way to remove these characters? I only have english installed on my keyboard.

Categories

Resources