Modify soft keyboard - G1 General

I have tried to modify the soft keyboard in cupcake, but with little luck... I thougth the easiest way would be to modify the existing code, but when I create a new project in eclpse based on that code, I get a lot of errors e.g. mScrollX cannot be resolved and com.android.internal.R cannot be resolved. It seems that eclipse doesn't recognize some of androids built in variables. I found a thread at google groups about the same problem, but I didn't understand the solution: "You need to change the code to use the public SDK (calling the View functions to get/set the scroll position etc).".
What I'm trying to do is modify the keyboard so that I don't have to long press a and o to get the norwegian letters æ, ø and å. I want them together with the english letters.

Related

keyboard messed up, registry hacks??

Hi Forum,
I installed the japanese IME as it was discribed at another forum (http://www.firstloox.org/forums/showthread.php?s=c973622a044a5a4a87c1f6099f097d74&t=4510), and it seems to work almost perfect on my qtek 9100, new German ROM installed. Only problem: the program changes the keyboard settings, means that I can't use the symbol- key (function+space) any more, so ä, ü, ö, ', ... are gone. I already tried AEKMap, when downloading the German keyboard file, it doesn't show up within the program. I inserted a new string called "Locale" to the registry-settings at HKCU/ControlPanel/Keybd etc., as it was posted here http://forum.xda-developers.com/viewtopic.php?t=44489
-nothing helped. Do I miss something?? I will go to Japan next Saturday and desperately neeeeeed a Japanese IME- but also my German keyboard layout!
Greetings from Berlin,
Andreas
Hi again, some more information: It seems that the keyboard is working, the only thing which doesn't work is the "symbol"-key (the "blue dot + space"-combination). Does anybody know if there's something hidden in the registry how I can re-map it and get it back to work??
Thanks,
Andreas
There's a text file you'd need. You can easily create this yourself, though it might help to just find it somewhere.
http://wiki.xda-developers.com/index.php?pagename=Changing_Device_Language
A pre-made on is in:
http://forum.xda-developers.com/viewtopic.php?t=43680&highlight=french+german
Hi ZeBoxx,
doesn't work for me, unfortunately. As I said, the layout of the keyboard is ok, only thing is the missing function of the "symbol"-key. I played around with different keyboard settings, they all work ok BUT this symbol think doesn't. Any other ideas??
Andreas
Did you specifically read this last part?
Symbols List - Changing the symbols when using the Sym hardware key along with a regular key (select devices)
Change the Symbols List
To change the Symbols List simply find the file "\Windows\sym.txt", and edit + save this file. The structure of the file is pretty straight-forward:
On each line, type the regular letter or number for the key as it is when normally pressed. Follow that letter up with the alternative characters ('Symbols') in the order you wish for them to appear. For example, from a WWE ROM:
eèéêë
This will replace the letter 'e' when using the Sym key with 'è', then when striking the Sym key again with 'é', then 'ê', and so on.
Click to expand...
Click to collapse
Sure, but as I said, it's not the problem that this text file is wrong or anything- it seems that the symbol key doesn't work at all. No matter how many times I use this combination (blue dot + space), nothing changes, no effect on any letter/symbol/etc.
In the meanwhile I did a hard reset, installed all the apps again, same issue. I uninstalled the japanese IME, back to normal. I'm pretty sure that this prog changes some registry setting I need for the use of the symbol-key- I searched the whole registry, but since I'm not familiar at all with this I didn't find anything helpful...
Andreas
got exactly the same problem. Searching Internet and all but I dont find any solution: there must be a registry entry enabeling it but where...
Yep, got the same problem. Finding it hard to search for relevant problems to do with this. Any help would be apprieciated.

Blackjack (SGH-i607) Keyboard Support

Hi,
I'm trying to add support for the Samsung Blackjack device's keyboard. It seems to have a special keyboard layout where each digit is shared between two buttons, for example, 'E' and 'R' are both used for '1'.
I didn't find any method of telling the OS to change between digit mode and character mode, but I might have just missed it.
I noticed that IME generates the same WM_KEYDOWN (VK_1) message for these two buttons ('E' & 'R').
Any idea how to create a generic solution for this kind of devices? I wouldn't want to query the OEM string and do it hardcoded.
Thanks!
Nergall

Changing harsware keyboard layout on the go - HOW?

There're many programs allowing you to change the virtual keyboard layout. Some of them allows you even edit the layout yourself to make it more comfy. However, when you try to type from the Hermes's hardware keyboard it's always using the original layout's characters. Is there any way to solve this problem?
Or where I can find docs and examples for writing the keyboard driver?
Look in the platform builder source code.
You might want to check out Buzzdev.net as well. Some recent efforts to rewrite the universal's driver.
V
----------

P/Invoke assistance

I'm working on an application. This application has several fields which will only have numerical input (Zip code, phone number, part #, etc).
This application runs on Windows Mobile 5 & 6 with a touchscreen and full keyboard (So basically Treo's and HTC phones).
To type a number on these phones, you need to hold down a Function Key, then hit a letter which corresponds to a number. It has been requested to eliminate the need to hit that function key, and have it automatically input the number.
I cannot hard code this because it's certainly not very extensible (Well, I could hard code it, but whatever)
I was thinking I could P/Invoke "keybd_event" the Function key, and it should work from there.
However, I cannot find what key code the "Function" key is.
And also, will this key code be the same across all phones?
I suppose one last note, if you know a better way to achieve this without using P/Invoke, I'm up for new ideas
Thanks for your time,
Dan
I'm afraid I can't be of much help here, but you for sure *can't* get a Function key code. There isn't. It's deep in the keyboard driver.
However, according to this, there's some hook you can ask OS for to convert letters to numbers. But with MS, it might as well be hidden from public...
There has to be some message that's sent to the OS when I hit the Function Key, I just (obviously) don't have Spy++ on my PPC.
I was looking up a few things.
Is there anything relevant contained in keybddr.dll?

[Q] Multipress with CM10

Hi, I just registered here, but have been reading parts of the forums for some time. I first had Motorola Milestone, that I managed to successfully flash with CM7 using information found here. Thanks to all for sharing their knowledge .
Now I have switched to Milestone 2 (bought with CM10.1 by Engle_Mars nightly installed, and had some troubles upgrading to 10.2 but it finally worked, and I am happy ). Thanks Engle_Mars for the great job.
There is one feature that I really miss from the previous Milestone. That is multipress, which allows you to double-press a key in the physical keyboard to make a national character associated with this key. For my language (Polish) it is for example a -> ą. This is much faster than the default long pressing and choosing the wanted character from the list, and I very much liked it in CM7 (it was under System Settings -> Device Settings). But in CM10.1 and CM10.2 from Engle_Mars I cannot find this feature. Is it not there, or am I overlooking it? Is there an app that could add this functionality? (I searched, but couldn't find any). If no, is it possible you could add this, Engle_Mars? I found mentions of this feature in threads for other phones using CM10, so I suppose it is a part of CM10, but didn't make it to Milestone 2 port for some reason.
kaziq said:
Hi, I just registered here, but have been reading parts of the forums for some time. I first had Motorola Milestone, that I managed to successfully flash with CM7 using information found here. Thanks to all for sharing their knowledge .
Now I have switched to Milestone 2 (bought with CM10.1 by Engle_Mars nightly installed, and had some troubles upgrading to 10.2 but it finally worked, and I am happy ). Thanks Engle_Mars for the great job.
There is one feature that I really miss from the previous Milestone. That is multipress, which allows you to double-press a key in the physical keyboard to make a national character associated with this key. For my language (Polish) it is for example a -> ą. This is much faster than the default long pressing and choosing the wanted character from the list, and I very much liked it in CM7 (it was under System Settings -> Device Settings). But in CM10.1 and CM10.2 from Engle_Mars I cannot find this feature. Is it not there, or am I overlooking it? Is there an app that could add this functionality? (I searched, but couldn't find any). If no, is it possible you could add this, Engle_Mars? I found mentions of this feature in threads for other phones using CM10, so I suppose it is a part of CM10, but didn't make it to Milestone 2 port for some reason.
Click to expand...
Click to collapse
Czechop cm 10.2 version (4.3.1 jellybean) has polish characters. Have a try.
Fedroid said:
Czechop cm 10.2 version (4.3.1 jellybean) has polish characters. Have a try.
Click to expand...
Click to collapse
Thanks, but I am already using it
The problem is not in the Polish characters availability, because they are available with a long press (and touch), but in the far more convenient way of typing them by double pressing (no touching necessary).
kaziq said:
Thanks, but I am already using it
The problem is not in the Polish characters availability, because they are available with a long press (and touch), but in the far more convenient way of typing them by double pressing (no touching necessary).
Click to expand...
Click to collapse
Active metakeys and hit alt-lock and then the key asigned.
To access polish letters, choose Qwerty polish in Settings->Language & Input->Sholes keypad->Set up keyboard layout. Use ALT LOCK or ALT LOCK + SHIFT to get polish letters. ALT LOCK + '?' is mapped to pipe symbol('|').
To use META key you have to turn off android hotkey shortcuts. Unfortunately lately they made this option invisible in settings. To open it you have to type this in terminal (with root access):
su
am start -a android.intent.action.MAIN -n com.android.settings/.quicklaunch.QuickLaunchSettings
It is supposed that you can hit alt lock and another fisical key to get your polish characters (no double pressing but at least pressing two keys)
Greetings:highfive:
Fedroid said:
Active metakeys and hit alt-lock and then the key asigned.
To access polish letters, choose Qwerty polish in Settings->Language & Input->Sholes keypad->Set up keyboard layout. Use ALT LOCK or ALT LOCK + SHIFT to get polish letters. ALT LOCK + '?' is mapped to pipe symbol('|').
To use META key you have to turn off android hotkey shortcuts. Unfortunately lately they made this option invisible in settings. To open it you have to type this in terminal (with root access):
su
am start -a android.intent.action.MAIN -n com.android.settings/.quicklaunch.QuickLaunchSettings
It is supposed that you can hit alt lock and another fisical key to get your polish characters (no double pressing but at least pressing two keys)
Greetings:highfive:
Click to expand...
Click to collapse
Thanks. That feature would be a bit less convenient, but still cool. But I can't make it working.
I called the QuickLaunchSettings, and cleared all shortcuts (there was no option to disable the whole QuickLaunch). Then I entered the Sholes keypad -> Set up keyboard layouts, and chose QWERTY-polish. After that Alt-lock works like before (one Alt-lock + letter gives that letter, another one gives the blue symbol on the same key). Adequately Alt-lock + ? does not give the pipe, but ? or /.
Maybe I should have disabled the QuickLaunch thing as a whole, but I can't find a way to do that.
kaziq said:
Thanks. That feature would be a bit less convenient, but still cool. But I can't make it working.
I called the QuickLaunchSettings, and cleared all shortcuts (there was no option to disable the whole QuickLaunch). Then I entered the Sholes keypad -> Set up keyboard layouts, and chose QWERTY-polish. After that Alt-lock works like before (one Alt-lock + letter gives that letter, another one gives the blue symbol on the same key). Adequately Alt-lock + ? does not give the pipe, but ? or /.
Maybe I should have disabled the QuickLaunch thing as a whole, but I can't find a way to do that.
Click to expand...
Click to collapse
You need contact rabinhood, he will help you. He is the key master!:laugh:
kaziq said:
Thanks. That feature would be a bit less convenient, but still cool. But I can't make it working.
I called the QuickLaunchSettings, and cleared all shortcuts (there was no option to disable the whole QuickLaunch). Then I entered the Sholes keypad -> Set up keyboard layouts, and chose QWERTY-polish. After that Alt-lock works like before (one Alt-lock + letter gives that letter, another one gives the blue symbol on the same key). Adequately Alt-lock + ? does not give the pipe, but ? or /.
Maybe I should have disabled the QuickLaunch thing as a whole, but I can't find a way to do that.
Click to expand...
Click to collapse
Hello.
First thing for not to get lost in JB keyboard is that keyboard mapping seems to be done in several "layers":
the closest to hardware is /system/usr/keylayout/sholes-keypad.kl (the exact file name may be different in different ROMs, but this file is used to manage built-in hardware qwerty, there are more files here for other devices - mostly bluetooth keyboards)
This file is used to translate hardware key scan codes to system key names (ALT, SPACE, A, B, C, and so on)
/system/usr/keychars/sholes-querty.kcm (name may also be different ie. snoles-keypad.kcm, more files are for different hardware)
This file is used for telling system what character should be displayed (entered) after pressing a particular key with or without particular modifier keys (what to enter after pressing A, SHIFT+A, ALT+A, META+A, and so on).
Both of these are simple text files, and can be edited directly, to achieve effects you have to reboot system. Also beware! If you mess up with these files, you may disable hardware keyboard completely! Then rescue is overwriting bad files with originals from backup.
options found in android settings -> keyboard (Polish-QWERTY, AZERTY, QWERTZ) work like overlays, if you enable them, the system will use mixture of original kcm file, and the overlay - so depending on what an overlay contents, it may disable some keys you defined in your kcm
So if you want to modify keyboard, you have to disable these overlays, otherwise you will not get any effect (and may become a bit frustrated, like I was before I found this).
I attach my latest files with Polish letters entered with ALT_RIGHT modifier (obtained after holding ALT key), blue symbols entered with ALT (obtained after pressing, then releasing ALT key, and then pressing apropriate letter key), Greek letters with META key (mapped on ALT_LOCK). To have uppercase letters you have to press SHIFT release SHIFT, then ALT+key for Polish letters, or same with META for Greek letters.
To have CAPS, you have to press SHIFT twice. To have ALT_LOCK, you have to press ALT twice.
I'm wondering. Right now I have, let's say, multi-ALT (acting like ALT_RIGHT when held, and like ALT when held and released). Maybe it will be possible to code META in exactly same way, so we'll have another modifier key (META_RIGHT), but that's just an idea, and I haven't researched that yet.
I also wanted to encode arrow characters (right, left, up and down arrows) on META-left, META-right and so on, but also haven't had time to do that yet.
Regards!
Chris
[edit]
Added arrow characters (META+left, META+right, etc). Added not equals sign (ALT+META+G), equal or smaller (ALT+META+Z), qual or greater (ALT+META+X), double tilda (ALT+META+~), euro (META+~).
New files in attachment.
rabinhood said:
Hello.
First thing for not to get lost in JB keyboard is that keyboard mapping seems to be done in several "layers":
the closest to hardware is /system/usr/keylayout/sholes-keypad.kl (the exact file name may be different in different ROMs, but this file is used to manage built-in hardware qwerty, there are more files here for other devices - mostly bluetooth keyboards)
This file is used to translate hardware key scan codes to system key names (ALT, SPACE, A, B, C, and so on)
/system/usr/keychars/sholes-querty.kcm (name may also be different ie. snoles-keypad.kcm, more files are for different hardware)
This file is used for telling system what character should be displayed (entered) after pressing a particular key with or without particular modifier keys (what to enter after pressing A, SHIFT+A, ALT+A, META+A, and so on).
Both of these are simple text files, and can be edited directly, to achieve effects you have to reboot system. Also beware! If you mess up with these files, you may disable hardware keyboard completely! Then rescue is overwriting bad files with originals from backup.
options found in android settings -> keyboard (Polish-QWERTY, AZERTY, QWERTZ) work like overlays, if you enable them, the system will use mixture of original kcm file, and the overlay - so depending on what an overlay contents, it may disable some keys you defined in your kcm
So if you want to modify keyboard, you have to disable these overlays, otherwise you will not get any effect (and may become a bit frustrated, like I was before I found this).
I attach my latest files with Polish letters entered with ALT_RIGHT modifier (obtained after holding ALT key), blue symbols entered with ALT (obtained after pressing, then releasing ALT key, and then pressing apropriate letter key), Greek letters with META key (mapped on ALT_LOCK). To have uppercase letters you have to press SHIFT release SHIFT, then ALT+key for Polish letters, or same with META for Greek letters.
To have CAPS, you have to press SHIFT twice. To have ALT_LOCK, you have to press ALT twice.
I'm wondering. Right now I have, let's say, multi-ALT (acting like ALT_RIGHT when held, and like ALT when held and released). Maybe it will be possible to code META in exactly same way, so we'll have another modifier key (META_RIGHT), but that's just an idea, and I haven't researched that yet.
I also wanted to encode arrow characters (right, left, up and down arrows) on META-left, META-right and so on, but also haven't had time to do that yet.
Regards!
Chris
[edit]
Added arrow characters (META+left, META+right, etc). Added not equals sign (ALT+META+G), equal or smaller (ALT+META+Z), qual or greater (ALT+META+X), double tilda (ALT+META+~), euro (META+~).
New files in attachment.
Click to expand...
Click to collapse
Cześć
Thanks for the explanation. Only after Fedroid's suggestion to contact you I have checked the Czechop's CM10.2 thread (found some of your posts there), and found out that you were working on the Polish keyboard. The instruction Fedroid gave me was not working, because I was not using the latest Chechop's CM release. I have now upgraded, and the keyboard is working. However there are some very minor issues:
(I am not using the keys file you posted, but only the features in the rom (23.10.2013).
1. After installation there is no default on-screen keyboard (and you cannot set it). This makes the buttons (Menu, Back, and Search) and the physical keyboard not working at all. The solution is to switch the system to another language and back to Polish. It might be a bug (probably not yours), but I cannot post in the devel threads yet.
2. "Ń" does not work. I remember like 10 years ago I was making a charmap conversion feature for my program, and found out that there was a conflict (of char codes), that "Ń" could not be mapped. I don't remember the details, but I suppose it might be the case here too.
3. Pressing ALT(-Lock) + DEL or ALT(-Lock) and then DEL causes the whole SMS or sentence to be deleted. Since in the SMS app there is no indication of the ALT-Lock state, you can easily do that by an accident and there is no Undo. Is it possible to disable the ALT(-Lock) modifier on the DEL key (so that it will only delete the whole sentence when ALT(-Lock) is pressed together with DEL)?
Thanks for the work you are doing .
Hello.
Czechop has included in his ROM some older version of my files. Without META key, and with ALT_RIGHT mapped to "ALT LOCK" key. Honestly speaking, I cannot tell much about his implementation, since first thing I do after his ROM flash is I overwrite sholes-keypad kl & kcm files with my own (with more features). I also encourage You to do so, since my files seem not to be affected with at least bugs 1 and 2 You presented.
Ad1: I have no problems with on-screen keyboard - if hardware keyboard if closed, on-screen version pops up. Also four capacitive buttons under screen work flawlessly.
Ad2: I have no problems with Ń (right now I've entered it with my hardware keyboard). Czechop told me about some problems with Ń, that system is not able to recognize too big number of keys pressed simultanously, and somehow Ń was suffering, but as you can see I've just entered it for the second time with no problems.
Ad3: I don't know how to fix it. Del key doesn't appear in kcm file, and I don't know how to modify it. And yes, pressing Del+ALT removes whole line, which is quite annoying. I'll do some more investigation, and maybe I'll find something.
Regards! It's nice to see, that at least in the field of MS2 android development Poland has some real power! :-ł
rabinhood said:
Hello.
Czechop has included in his ROM some older version of my files. Without META key, and with ALT_RIGHT mapped to "ALT LOCK" key. Honestly speaking, I cannot tell much about his implementation, since first thing I do after his ROM flash is I overwrite sholes-keypad kl & kcm files with my own (with more features). I also encourage You to do so, since my files seem not to be affected with at least bugs 1 and 2 You presented.
Ad1: I have no problems with on-screen keyboard - if hardware keyboard if closed, on-screen version pops up. Also four capacitive buttons under screen work flawlessly.
Ad2: I have no problems with Ń (right now I've entered it with my hardware keyboard). Czechop told me about some problems with Ń, that system is not able to recognize too big number of keys pressed simultanously, and somehow Ń was suffering, but as you can see I've just entered it for the second time with no problems.
Ad3: I don't know how to fix it. Del key doesn't appear in kcm file, and I don't know how to modify it. And yes, pressing Del+ALT removes whole line, which is quite annoying. I'll do some more investigation, and maybe I'll find something.
Regards! It's nice to see, that at least in the field of MS2 android development Poland has some real power! :-ł
Click to expand...
Click to collapse
Thanks. I finally decided to try your files out, but I have hit a serious problem. When I tried to rename the file /system/usr/keychars/sholes-qwerty.kcm for a backup, I couldn't do it. I tried the ES File Explorer (root mode on), and it showed "the task did not succeed". I also tried typing su then mv sholes-qwerty.kcm sholes-qwerty-old.kcm while in the right directory, and got "Read-only files system".
How do I apply your files?
If czechops rom uses your key mapping files, i like to thank you rabinhood. Works well with german umlauts out of the box. And thanks to this thread I found out how to use them.
Greetings
hamu
kaziq said:
Thanks. I finally decided to try your files out, but I have hit a serious problem. When I tried to rename the file /system/usr/keychars/sholes-qwerty.kcm for a backup, I couldn't do it. I tried the ES File Explorer (root mode on), and it showed "the task did not succeed". I also tried typing su then mv sholes-qwerty.kcm sholes-qwerty-old.kcm while in the right directory, and got "Read-only files system".
How do I apply your files?
Click to expand...
Click to collapse
If you have problems with root access from file manager, I think the easiest and most reliable way to modify system files is:
1. Enter bootloader menu.
2. Select Tools -> USB Mount tools -> Share system
3. It should be recognized and mounted on your PC. (I'm running Linux, I think Windows won't be able to mount ext3/ext4 partition without some extra software.)
4. To copy files you have to be logged as root.
If I want to copy these files from running Android, I use ROM Toolbox Pro -> Root explorer.
---------- Post added at 09:53 AM ---------- Previous post was at 09:45 AM ----------
hamuchen said:
If czechops rom uses your key mapping files, i like to thank you rabinhood. Works well with german umlauts out of the box. And thanks to this thread I found out how to use them.
Greetings
hamu
Click to expand...
Click to collapse
Umlauts are Czechop's job. Say "thank you" to him.
rabinhood said:
If you have problems with root access from file manager, I think the easiest and most reliable way to modify system files is:
1. Enter bootloader menu.
2. Select Tools -> USB Mount tools -> Share system
3. It should be recognized and mounted on your PC. (I'm running Linux, I think Windows won't be able to mount ext3/ext4 partition without some extra software.)
4. To copy files you have to be logged as root.
If I want to copy these files from running Android, I use ROM Toolbox Pro -> Root explorer.
Click to expand...
Click to collapse
Thanks. I used the bootloader and a small linux pc (OpenPandora), and it worked .
But now only the Polish characters work with ALT-hold. Greek does not work (ALT-Lock + key does not produce anything), but ALT-Lock + arrows also work. It doesn't matter for me, because I don't use Greek letters, and this way is more comfortable for Polish chars.
A small quirk: Capital Polich characters work with Shift + ALT + key pressed as well as Shift press and release and then ALT + key. Except for... Ń, which works only with the latter . It's not an issue for me, just a funny notice.
Thanks again for this.
rabinhood said:
Umlauts are Czechop's job. Say "thank you" to him.
Click to expand...
Click to collapse
Ah, ok. Then, nevermind. But thank you anyway for not letting this device die.
Greetings
hamu
kaziq said:
Thanks. I used the bootloader and a small linux pc (OpenPandora), and it worked .
But now only the Polish characters work with ALT-hold. Greek does not work (ALT-Lock + key does not produce anything), but ALT-Lock + arrows also work. It doesn't matter for me, because I don't use Greek letters, and this way is more comfortable for Polish chars.
A small quirk: Capital Polich characters work with Shift + ALT + key pressed as well as Shift press and release and then ALT + key. Except for... Ń, which works only with the latter . It's not an issue for me, just a funny notice.
Thanks again for this.
Click to expand...
Click to collapse
Oh, yes, now I see what's going on with Ń. I haven't noticed it before, as I always press SHIFT, release it, and press ALT+key. Czechop told me that it is some kind of bug in keyboard hardware driver not dealing with too many keys pressed at the same time (but in particular N key).
My Greek letters are working, I don't know what might happen. Just in case I attach again latest version of kl/kcm files. Please copy them over files you have now, and remember to disable any keyboard overlays in CM10.2 settings.
Thanks.

Categories

Resources