Quick and short of it:
The SK4G has the same exact physical Keyboard layout of the G1. But it sucks in comparison to the G1's layout because someone at Samsung dropped the ball. Shift + a number does not give you the normal expected symbol. There is a lack of a comma on the right hand side. Shift+Alt tends to not do anything on most keys. With this mod, I fixed 90% of the annoyances of the hardware keyboard (Just need to turn the [useless everywhere but the stock messaging app] smilie key into the voice key, and the voice key into an alt key and I'll be 100% good)
By hacking the corresponding kcm.bin file in the /system/usr/keychars/ directory, you can change the action of a key. This is not the same as changing the kl file in /system/usr/keylayout/ which allows you to change the behavior of a physical key. (A bit of semantics really.)
I modded the default kcm.bin (Binary Keyboard Character Map) file s3c-keypad.kcm.bin to match the G1 kcm closely, adjusting for what is printed on the SK4g keyboard, so w, e, and r are still smilies, and m is still /, while alt+shift+? is now ¿ as the g1 has. Only change to what is printed was fixing the multiplication sign symbol on alt+o to show an actual multiplication sign, instead of an x. Some unused alt+shift+key were used to improve usage, and for flair.
Main Changes:
shift+number provides its corresponding symbol, like it should.
alt+shift+O is the Umlat combining accent (press another character afterwards it it might combined, like ¨ + u is ü. Same result as longpressing U).
Alt+Q default by Samsung is a Space. Alt+Shift+Q is now Tab.
Alt+Shift+T is the "¬" not symbol. Sideways L. Useful for ¬_¬ sideway glances.
Alt+Shift+Y is the unicode STAR AND CRESCENT. SK4G can't display it, but it will show up correctly in OSes that understand it/have the right encoding (like the G1).
Shift+Period is a comma. Because the comma belongs on the right side of the keyboard dammit.
Alt+Period is a bullet symbol.
Alt+Shift+Period is a "`" Grave combining accent (same as Umlat. Grave + space is regular grave)
Alt+Shift+Enter is a CR return key, instead of the normal LF return key. Some apps recognize the difference (ConnectBot)
[email protected] and [email protected] is the ~ tilde. I did not add the combining accent version. An adult keyboard requires the ~.
[email protected] is the Eighth Note. Because we all need some music in our lives. Displays properly on the SK4g.
Instructions:
If you want to use the character map I created, you will need root, adb, and be comfortable mucking about the phone's system files. You can install with RootExplorer or any other file manager instead, if you know how to do it:
Code:
adb push /path/to/unzipped/files/mods3c-keypad.kcm.bin /data/local/tmp/
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
cp /data/local/tmp/mods3c-keypad.kcm.bin /system/usr/keychars/
cp /system/usr/keychars/s3c-keypad.kcm.bin /system/usr/keychars/s3c-keypad.bu
mv /system/usr/keychars/mods3c-keypad.kcm.bin /system/usr/keychars/s3c-keypad.kcm.bin
chmod 644 /system/usr/keychars/s3c-keypad.kcm.bin
You need to push the file to the tmp folder, then going in as superuser, remount the system partition.
Once remounted, you can copy the file to the correct folder.
Safety first, make a backup of the original file. A copy of the original is also provided in the zip folder.
Now you overwrite the original.
Once that's done, you want to correct the permissions to 644 like the original.
At this point, you can reboot. If you want to give it a try before rebooting, you can just load any app that isn't in memory, or kill an existing app, and load it back up, and type to see the difference. You must reboot if you want to see the changes everywhere. Any app in memory, including home and system, will not see the new file till you kill it/reboot.
What's in the zip:
Four files are provided in the zip.
1: "s3c-keypad.kcm.bin" This is the original kcm.bin from the stock KD1 firmware. Most likely, it has not been change in KG2.
2: "trout-keypad-v3.kcm" This is a plain text readable version of the G1 kcm. Look at this if you want to see the format android uses to build the kcm.bin file. Easy to read.
3: "mods3c-keypad.kcm" This is a modified kcm file, easy to read showing what my modded layout is, with notes.
4: "mods3c-keypad.kcm.bin" the actual kcm.bin file you can use to drastically improve your keyboard.
If You want to make your own:
Some Resources First:
ASOP Developers Guide to the Keyboard:
http://www.kandroid.org/online-pdk/guide/keymaps_keyboard_input.html
Describes how Android uses (some of) the keyboard files, and the file layouts.
Extending the keyboard mapping of an Android system
http://jahrome.free.fr/index.php/keyboard-mapping-android-htc-desire?lang=en
Found this after the fact, some xda members doing this on the g1 way back when:
http://forum.xda-developers.com/showthread.php?t=468703
Someone had a python tool to turn kcm.bin to kcm files.
http://forum.xda-developers.com/showthread.php?t=837002
Basically, you will be mucking around a hexeditor to change the kcm.bin file.
Make the hex editor show you 16 bytes per line, and you will see a nice pattern, as shown on the http://jahrome.free.fr/index.php/keyboard-mapping-android-htc-desire?lang=en.
Any non-normal (unicode) character should be put on the hex side, so 0x0300 would be typed in. Additionally, hex editors tend to show lsb first. So unicode 0x0300 would show up as "00 03". 0xEF01 will be seen as 01 EF.
If you look and compare the hex editor screen to the kcm file provided, you can easily modify the kcm.bin file to your liking.
Future:
I'm trying to find where the LongPress Keyboard character maps are. Like when you longpress ! lets you choose ¡, or long pressing shift+4 ($) gives you the option to insert a couple of currency marks, or longpressing a will let you choose from accented a characters (å,ä,â etc).
Additionally, also looking for the same on the Extended Feature keys, like SYM, and the smilies. The smilies are just macros that get typed when you press them, as using the regular smilie types ":" "-" and ")", and you can delete each one individually. Having a customizable macro key would be great.
But from my guess, one or both of those features are embedded in the keyboard device driver. I will muck around the filesystem to see what I can find.
Notes:
I am not responsible for anything ever anywhere. You break it, you pay it, not me.
Also, this is only for the hardware keyboard, not the virtual IMEs. Changing those would require apk code signing, and desamali and everything. headthefrickache.
thank you!
this is gonna be really helpful and fun to mess around and make my own. glad to have another dev aboard!
Update: I poked around a bit, and looked at the ime-htc.apk that is floating around. Decompiled the apk, and found that it's popup alternatives for the virtual keyboard is in res/values/strings.xml, with the fields pointed at it by res/xml-normal-hdpi/*.xml depending on which language/shape/layout keyboard you are using.
So I think I am right in assuming that the hardware keyboard popups are in the device driver. :/ Will investigate further.
Oh, and a note about the sidekick keyboard. You cannot press and hold ALT+SHIFT and a third key at the same time. You can't press any three keys and have it register at the same time at all. Another instance where the g1 was just better
Additionally, doesn't seem like all keys respond to a alt-lock+shift-lock the same. The @ and ? key seems to only produce the alt or shift version, while most of the others produce the alt+shift version of the key.
This ****ing guy, eh? When can I buy you strippers and blow, eh? I ****ing love you.
chaostic_2k1 said:
Update: I poked around a bit, and looked at the ime-htc.apk that is floating around. Decompiled the apk, and found that it's popup alternatives for the virtual keyboard is in res/values/strings.xml, with the fields pointed at it by res/xml-normal-hdpi/*.xml depending on which language/shape/layout keyboard you are using.
So I think I am right in assuming that the hardware keyboard popups are in the device driver. :/ Will investigate further.
Oh, and a note about the sidekick keyboard. You cannot press and hold ALT+SHIFT and a third key at the same time. You can't press any three keys and have it register at the same time at all. Another instance where the g1 was just better
Additionally, doesn't seem like all keys respond to a alt-lock+shift-lock the same. The @ and ? key seems to only produce the alt or shift version, while most of the others produce the alt+shift version of the key.
Click to expand...
Click to collapse
Port G1 driver? Whoz got the sauce? erm Source?
Well, I figure the g1 just dedicated more gpio than sumsung did for the keyboard. I doubt the g1 driver can be ported. And the sumsung keyboard driver might be hackable, but without the source for it, it be a pain to try. Still looking for the long press keys though.
I may be confused about your question. I can't seem to understand what you mean by hardware keyboard popup, but yes, the keyboard driver is in the kernel, so you'd need a custom kernel to change that.
The kernel source is available at opensource.samsung.com
If you can pm me/write what you're trying to do/fix (as I'm currently a bit confused as to your goal) I would be open to helping work on this
If you hold down the a key on the keyboard, you get a little popup screen that lets you choose the alternative versions of a, like å, ä, á, etc. Same for holding shift+4 or alt+4, would give you the alternatives for $, like ¥, british pound symbol, etc.
I am trying to find where that information is held. On an ime, it's in the strings.xml file inside the apk. For the hardware keyboard, I'm guessing its in the driver. I'm trying to locate that, so that it can be changed to include more things (and in the sk4g, even add macros like the smilies).
Unfortunately, noone else has found it, or if they have, it's buried in some obscure thread inside some obscure device's forum. The problem with android information, is that with so many devices, and versions, there is a ton of information, being redundantly found/created, and buried under other information.
Haha I hear that. I guess I was testing it out using the wrong buttons before, as I didn't get that popup before. Now I was able to, but it looks like it's only for certain keys. At any rate, let me look in the kernel source to see if I can find the correct files there.
sduvick said:
Haha I hear that. I guess I was testing it out using the wrong buttons before, as I didn't get that popup before. Now I was able to, but it looks like it's only for certain keys. At any rate, let me look in the kernel source to see if I can find the correct files there.
Click to expand...
Click to collapse
I will donate money to this project. No ****ing joke. I wanna see this **** happen.
$50 is what I'm putting down at the moment. I'll put down more if more coders want to help out sduvick and make this work wonderfully.
Requirements,
01. Have all the features which the OP is attempting to incorporate.
02. Have a secondary .apk which allows users to modify key layout whilst using the phone.
Update/message towards chaostic: it appears that the longpress popup is coming from /system/framework/services.jar (desmali'd) com/android/server/KeyInputQueue.
On a somewhat related note, trying to find the keymaps for smileys to remove the extra alt added after the '<3' alt key if anyone might know where that is. EDIT: re-read your OP, looks like you couldn't find these either, but apparently this was fixed in the KG2 update, so maybe the kernel updates might give me more details. will update shortly.
UPDATE: found the smileys in /system/framework/framework.jar (desmali'd) com/android/internal/widget/smileys.smali
sduvick said:
Update/message towards chaostic: it appears that the longpress popup is coming from /system/framework/services.jar (desmali'd) com/android/server/KeyInputQueue.
On a somewhat related note, trying to find the keymaps for smileys to remove the extra alt added after the '<3' alt key if anyone might know where that is. EDIT: re-read your OP, looks like you couldn't find these either, but apparently this was fixed in the KG2 update, so maybe the kernel updates might give me more details. will update shortly.
UPDATE: found the smileys in /system/framework/framework.jar (desmali'd) com/android/internal/widget/smileys.smali
Click to expand...
Click to collapse
So the smilies have been found is great, but the two things of note is how difficult it would be for a regular edit, so for rom builders or themers its great, but individuals would be hard press to change it.
Just to make sure, these are the alt+w or alt+e or alt+r smilies/macros, or is it the smiliey key widgets?
Either way it gives me somewhere to look. Seems the longpress alternatives is a longshot for easy modding at this time. But ever forward. Thanks.
I would integrate it as part of the tweaks thread I've been working out of, but it's a matter of changing some very simple (once you get it extracted and desmali'd) source, just looking through one file and looking for the strings for each smiley. Mind you, this is only for the smiley button itself, that is the popup that appears in messaging when you try to use the smiley button. This doesn't really relate at all to the keyboard at all actually.
Any key presses are gonna be from the kernel somewhere, still waiting on the download, samsung's opensource server is slow as balls.
Works great; how to edit
I just did this and it solved one of my two huge dissatisfiers with the Sk4G over the G1 and the actual original Sidekicks (where I was one of the people who convinced them to add | and ` and ~ back at Danger).
I really wanted to type ` by itself, so I edited my keymap so that [email protected] is ~ but alt-~ is `. I did this using emacs, with hexl-mode, and it was a snap!
Also, even though I've used adb in the past, I got stuck at su and it did nothing. I realized I needed to be running the SuperUser app first, and once I did that and ^C'd out of the su, it prompted me and I allowed it to remember shell request, and everything from then on worked great!
Thanks!
Leigh.
Glad it Helped someone
Can you hack the keyboard to allow virtual keyboard to work while in landscape mode?
Thanks that is awesome
This was really helpful.
I'm been bothered with the funky behaviour of shift+0-9
I also mapped alt-a a to escape
and changed alt-q from space to really being tab
The .kl file was also interesting:
/system/usr/keylayout/s3c-keypad.kl
It is just a textfile, so easy to edit and I was able to remap the mostly useless SMILEY key to GRAVE.
which is helpfull when I need a ~.
The .kl file also has all the other buttons on the SK4G so they can be reassigned.
I moved VOICE_INPUT to what was MULTITASKER, so I can enter voice commands without opening the keyboard.
and made myself a ALT_LEFT.
Smart Quote-enabled Physical Keyboard
First off, a huge thanks to chaostic_2k1, whose hack of the Sidekick 4G keyboard is brilliant. It was the only one I could find, and his instructions are first-rate. Using his modified s3c-keypad.kcm.bin file, I’ve been able to concoct a keyboard that has all of his fine variations along with smart-quote and easier em-dash ability.
If users are trying to write a professional manuscript, they need smart quotes (curly quotes), em dashes, and ellipses. The attached file has these modifications:
ALT-f = left double quotation mark
SHIFT-ALT-f = still gives the left bracket
ALT-g = right double quotation mark
SHIFT-ALT-g = still gives the right bracket
[These brackets are also stock-accessible with ALT-space]
[Right and left double quotation marks are stock-accessible with ALT-k, long press, etc. The keystrokes in this file cut down the number of steps]
ALT-lowercase L = right single quotation mark (curly apostrophe)
SHIFT-ALT-lowercase L = straight apostrophe
ALT-t = regular hyphen
SHIFT-ALT-t = em dash
[The em dash is still stock-accessible with ALT-t, long press, etc.]
The ellipsis is stock-accessible with ALT-space. I didn't modify anything connected with the ellipsis.
Follow the instructions in the first post of this thread for proper s3c-keypad.kcm.bin copying into /system/usr/keychars
Root obviously a must, and I used Total Commander file manager to copy file from sd card to /system/usr/keychars
If using Total Commander, remember to change /system directory to read-write.
Proper screen display of smart quotes: neither ThinkFree or Kingsoft word processors will display the actual right and left double quotes, though the quotes will enter correctly and display on a desktop word processor, printer, etc. In order to see double quotes correctly, users must use QuickOffice or TextMaker word processors [for reasons I can’t figure, KingSoft doesn’t even allow ALT-space or any SHIFT-ALT keystroke].
This keyboard mapping works on my Sidekick 4G, but I take no responsibility for any problem. I’ve also hacked the /system/usr/keylayout/s3c-keypad.kl to change key 54 SMILEY to key 54 TAB WAKE_DROPPED
This changes the SMILEY to a proper tab.
Do take care with the /system/usr/keylayout/s3c-keypad.kl If you screw it up, all physical keys, including Menu, etc, are dead, and you have to touch-screen the restoration of the original file. A little scary.
EDIT/UPDATE: Attached is the kcm file with an additional character: the left apostrophe. SHIFT-ALT-k = left single quotation mark
This is needed for smart quote usage when quoting within double quotes: "So when you said 'yes,' you really meant no."
Jake
Related
does anyone know of a program to perform multiple actions or launch multiple apps?
i want something which would allow me to create a exe file (which i can put in start menu or assign to a button) which will complete several actions after being selected.
such as: wifi on, launch ie or bluetooth on, launch wmp or close all, power off... etc,
you get the idea i hope
mortscript
Midget_1990 said:
mortscript
Click to expand...
Click to collapse
i should have expected that but thanks
however, i was hoping for something with a ui, and without a 60 page manual which looks to complicated for me on the first contents page
i guess i'll have to start reading the accumulation thread and manual a lot
Hi and thanks guys,
I finally started using mortscript, it's actually very simple to use (at least for what i want) it just looks very difficult to use when you read the site and the manual. Though it did take me all of today to work out why i could not get vjvolubilis to work (i missed a "," out ) and a while to create .mscr instead of .txt.
But it's a shame it only supports system, and not ring volume changing.
I love this site - every time i think my ppc is as good as i can get it, something else pops up to make it better
Hi Gurus,
I've just upgraded my 2 year old TMobile SDA from WM5 to WM6.1 Std from Karhoe's excellent guide.
It worked beautifully, and now I'm trying to tweak the phone to make it better for me.
Firstly, I'd love to map the T-Zones key to the Task Manager app, which I run frequently to free up memory. With the original WM5, it was as easy as editing a registry after app-unlocking the phone.
With the WM6.1 update, I have no idea how to do that again. I found a reference to something like this on this thread but I don't want it to point to a different URL... I want to point it to the Task Manager launcher.
How do I do that?
Also, how do I change the default view on the 'Start' menu from a list of icons to a flat numbered list? I'd love to be able to launch an item with a number... they way I had it in WM5, because my toggle key isn't as responsive as it used to be.
Many thanks!,
Ananda
Edit the AP3 and AP4 file in Windows folder
Short v/s Long?
Thanks for pointing me in the right direction karhoe!
I re-mapped the T-zone button (Short_AP1, Long_AP1) links to point to the Tasks and Task Manager executables, but only the short_ap1 seems to work.
I'm assuming that the short_apX links are executed by a short press, and the long_apX links are executed by a long press... however pressing either for a short click or a long press, both only activate the short_ap1 mapped executable. Am I missing something?
Thanks,
H
I think I posted before somewhere about Long_AP# , it doesn't really work as it has something to do with the keyboard drivers.
Well, I have thought of what you thought before.
To have Short_AP2 to open Messaging, and Long_AP2 for compose new SMS
Ah!
So it doesn't work... possibly, as yet. O well... I can live with that.
Many thanks!
I have Astro and Linda file manager, but they won't let me access the folders on my phone. Do I not have them set correctly, or do they just not let you get into the directories on the phone? Would be easier to go poking around instead of doing lots of cd ./folder and ls to see, and so on. wish i couldadd Astro to the superuser whitelist if that is all you have to do.
Shaggy
I asked the same thing, and got flamed saying I shouldn't be allowed to have root access.
I did some research on this, because I was trying to see if there was an easy way to launch an apk as su. As far as I can tell, when launching an apk, as soon as zygote takes over, and creates the vm process it applies predefined permissions to the running process. I don't know if these permissions can be changed by the devs, but apparently the ASTRO dev didn't really want to make a root version.
I do know, however, that if the application uses console commands, that the developer can prefix commands with su to all the program to have root access from inside the app's vm.
Would also like to know how to do this- with a GUI interface file browser such as these, it would be MUCH easier to navigate and figure out where specific files are located.
I'm glad I'm not the only one that prefers a GUI over typing tons of commands on a little keyboard. Even worse trying to read that little font, plus my screen has many spider web cracks in it, making it a pain in the ass to read.
Shaggy
Shagman68 said:
I'm glad I'm not the only one that prefers a GUI over typing tons of commands on a little keyboard. Even worse trying to read that little font, plus my screen has many spider web cracks in it, making it a pain in the ass to read.
Shaggy
Click to expand...
Click to collapse
There is an option to make the font size larger-- press Menu and hit Font Size, then click whatever size you want
I prefer command line over GUI in most cases, but here a file manager would make life a lot easier. The keyboard is just a pain to type .'s and /'s in. For file deletion etc a gui would be easier.
Darkrift said:
I prefer command line over GUI in most cases, but here a file manager would make life a lot easier. The keyboard is just a pain to type .'s and /'s in. For file deletion etc a gui would be easier.
Click to expand...
Click to collapse
Yea! I love a blinking cursor, #, or $ as much as the next *nix sysadmin, but seriously, I wipe my phone quite frequently, and everytime I do, I either have to fire up adb shell (I work a lot and when I get home the last thing I want to do is sit behind a computer again) or terminal emulator (annoying with small keyboard) to delete the crap apps that come stock on the different builds...although when I get around to it I'm just going to figure out how to make my own update.zip
This is a two part question
I have the A700 and, frankly, I love it to pieces
1. I have a problem with app text size.. Most of the apps have teeny-tiny text that I can't read. The talk-back affects my ability to scrll up and down so text-to-speech is not an option. Is there anything to be done to control app text size?
2. I was goofing around with the Barcode scanner and I got somthing with small print as well as a bar code and I get the printed part in the scanner square. What I saw blew me away. The print was very legible and got an idea. If you could expand that magnified area to fill the screen and do away with the red scan line, you could have a very good reading device for persons with low vision. Even better, if you could route it through the Android browser, you could set it up "darkfield"; White on black. Those of you have have ever done microscopy know about the "darkfield microscope" designed to make things easy on the eyes for long-period use, not to mention using the browswers zoom command. This would duplicate the action of the current low-vision reading device known as the CCD/TV which, the last I was sure of cost $US1200 and am told is down to $US700. I contacted the creator of the Barcode Scanner app and he said that it was open-source. If what I have suggested could be done; expand the veiwing field to full screen and removing the red scan line this would make the A700 a very good low-vision reading device at about 65$ of the price of a CCD/TV
Could someone adapt the Barcode Sanccer program to expand the viewing/magnifying area to the full screen and eliminte the rad scan line?
Hi Space Patroller,
1. There are two ways to accomplish resizing the text:
1.1: Go to Settings > Accessibility and tick the Large text box. If that isn't big enough, or just not right, try 2.
1.2: Go to Settings > Display and tap on the Font size button. There you'll find the four options: Small, Normal (default), Large, Huge.
2.
I contacted the creator of the Barcode Scanner app and he said that it was open-source.
Click to expand...
Click to collapse
That is quite the easy answer. I don't think the developer wanted to actually implement it or he just didn't have time.
To edit the source, you have to have some knowledge about the coding/scripting language. It's not something a regular "customer" could do.
I couldn't do it either, so you might want to create a new topic in either one of those:
http://forum.xda-developers.com/forumdisplay.php?f=565
http://forum.xda-developers.com/forumdisplay.php?f=524
Maybe there are people with the particular knowledge who could accomplish what you want. Though removing the red line wouldn't be a huge problem for people with a little knowledge about the language.
Low Vision Iconia
I have already tried the methoids you mentioned. 1. They don't make that much of s size difference 2. The don't control the app text size in most cases. I got BigFont and that helps somewhat but not with app text
I quite agree about knwing the code and the creator really did not want to be involved I put it here beccause I was told to put all questions in the "general" forum
I am talking here about severe visual disability like not being aable to get a driver's license severe. Are you sure it is all right for met to post my question in those forums? I do not wish to give offense, but if this were done it would bring this cost of reading devices down by at least half
Space Patroller said:
I have already tried the methoids you mentioned. 1. They don't make that much of s size difference 2. The don't control the app text size in most cases. I got BigFont and that helps somewhat but not with app text
I quite agree about knwing the code and the creator really did not want to be involved I put it here beccause I was told to put all questions in the "general" forum
I am talking here about severe visual disability like not being aable to get a driver's license severe. Are you sure it is all right for met to post my question in those forums? I do not wish to give offense, but if this were done it would bring this cost of reading devices down by at least half
Click to expand...
Click to collapse
You could also try to ajust the LCD Density. The LCD Density changes the whole resolution of your tablet, which makes everything looks bigger or smaller (texts, but also buttons in apps or games).
You'll need, however, require root permissions in order to do that.
There are two ways:
1. Manually: Download a file browser which is capable of viewing the root of the tablet. Root Explorer will do that for you, but it's shareware. There are other free apps out there which can do the same thing, but Root Explorer is able to edit files. You can also try AndroZip and then edit files with Documents To Go 3.0.
Navigate to /system/. Search for the file default.prop. Edit the file and search for lcd_density = 240 (which is the default). Change it to a higher value. I'm not quite sure which values are valid, because it'll also affect the Google Play Store compatibility checker. I think 320 is a valid value. You can also play a little with it, but you have to reboot the tablet every time you change the value.
2. Automatically (On The Fly ajustable, won't survive reboot ): Download LCDDensity for Root and check it out, haven't been able to get my hands on the app yet.
I think it's okay to post a question in one of these forums, you should edit the question a little though. You should mention the severe vision disability and then that you would want anyone to look into the app because it is open source; With of course the two things you want different. Though I really want to help you with that, I don't have the programming knowledge. I'm not sure if anyone is willing to help you out with something "complicated" like that, because people willing to do stuff that include changes like those are hard to find.
Space Patroller said:
This is a two part question
I have the A700 and, frankly, I love it to pieces
1. I have a problem with app text size.. Most of the apps have teeny-tiny text that I can't read. The talk-back affects my ability to scrll up and down so text-to-speech is not an option. Is there anything to be done to control app text size?
Click to expand...
Click to collapse
Hi, I don't know if you updated already to JB, I did, and as a novelty there's an option to extend the apps' visualization to fill all of the screen's real estate, afterwards the text gets bigger. A new "enlarge-stretch" icon appears near the clock in the navbar in (almost) every open app. But maybe you already found out by now
Hi,
I've read all possible threads trying to answer my question and tried editing and creating .kl files with no effect.
None of my mouse buttons can be remapped using the simplest method - by making a .kl file .kl.
Key list:
0x110 (key 272) left click button - mapping BTN_LEFT
0x111 (key 273) right click button - mapping BTN_RIGHT
0x112 (key 274) middle button (scroll button) - mapping BTN_MIDDLE
0x113 (key 275) back/previous button - mapping BTN_SIDE
0x114 (key 276) forward/next button - mapping BTN_EXTRA
KeyTest app that shows details on keypresses returns info only for the FORWARD and BACK mouse buttons. Pressing the rest gives no output.
I managed to remap these two keys with Xposed Additions Xposed Framework module.
Unfortunetly I couldn't do the same for 3 remaining keys
Some questions relating the issue:
Are mouse devices remapped some other way then by making a .kl file for them? Is there even an official, Google way to remap them? Just like the one in the Dev site?
Can you determine which .kl file is used by a specific device? With a shell command maybe?
RESEARCH:
Android Button State
An Android button state is a standard identifier defined in the Android API for indicating which buttons (on a mouse or stylus) are pressed. Android button states are defined by the android.view.MotionEvent class as constants that begin with the prefix BUTTON_.
The current button state is determined by the Android InputReader component which monitors when buttons (on a mouse or stylus) are pressed / released and sets / resets appropriate button state flag.
The relationship between buttons and button states is hardcoded.
Click to expand...
Click to collapse
Source Android official website - > Devices -> Interfaces -> Input -> Key Layout Files site describing .kl files usage and syntax doesn't mention anything about the mouse - so is there no .kl for mouse? No "official" way of remapping the keys? or if I think right, basing on "Android Button State" mentioned above; left, right and middle mouse buttons are hardcoded and can't be just remapped? So where is it hardcoded then?
Source Android official website - > Devices -> Interfaces -> Input -> Input Device Configuration Files
The default behavior for a mouse is to present an on-screen cursor which tracks the mouse's movements and simulates touches when the mouse is clicked. Although the mouse can be configured differently, the default behavior is usually sufficient for standard mouse peripherals.
Click to expand...
Click to collapse
Eem... ok so it says it can be configured otherwise, but how... if the .kl files are not working...
Input Device Configuration File - /system/usr/idc/Vendor_XXXX_Product_XXXX.idc
I have tried making an .idc file for my mouse and it's being used, but I don't know what I should put in it so Android would also use a .kl or .kcm file for the mouse just like it does for keyboards.
Logcat output:
I/EventHub( 656): New device: id=32, fd=173, path='/dev/input/event6', name='Bluetooth Mouse', classes=0x80000008,
configuration='/system/usr/idc/Vendor_099a_Product_0500.idc', keyLayout='', keyCharacterMap='', builtinKeyboard=false, wakeMechanism=EVIOCSSUSPENDBLOCK, usingClockIoctl=true
Click to expand...
Click to collapse
After connecting keyboard: (I don't have an .idc file for the keyboard, there is no need for it)
I/EventHub( 656): New device: id=33, fd=173, path='/dev/input/event6', name='MEDION MD86853', classes=0x80000003,
configuration='',keyLayout='/system/usr/keylayout/Vendor_04e8_Product_7021.kl', keyCharacterMap='/system/usr/keychars/Vendor_04e8_Product_7021.kcm', builtinKeyboard=false, wakeMechanism=EVIOCSSUSPENDBLOCK, usingClockIoctl=true
Click to expand...
Click to collapse
Can I add some parameters to the .idc file that would force using a specific .kl file? I can't find any documentation for .idc files contect that would be more exensive - a list of possible variables/values would be nice, but I can't find it.
Try using this app: https://play.google.com/store/apps/details?id=com.tincore.and.keymapper&hl=en
@Ventricle have you found ansolution?
@Ventricle - did you find a solution for this? I am trying to move pointer with a gamepad X and Y axis. so far i couldn't do this. thanks.
No, sorry I couldn't do it with any known methods. It's hardcoded I guess - still possible to change, but would require more in-depth looking and then changing some files.
I've been using PhoenixOS and RemixOS recently and they have mouse right click and middle click sorted out. I'll look into the system files and maybe I can reproduce the method (I hope that's legal )
I know something about this but, only if somebody still need help.
Nickescd said:
I know something about this but, only if somebody still need help.
Click to expand...
Click to collapse
Hi, I need to change usb mouse right button from "back" fuction to "menu" is that possible? I am android 8.1 rooted, thanks
Nickescd said:
I know something about this but, only if somebody still need help.
Click to expand...
Click to collapse
Please, I've looked into this for months and there's literally nothing I can find to help me. I just want to be able to rebind right click and it's impossible.
I'm also looking for solutions. I've tried tincore, many other remappers, going into the .kl files directly.. I thought about making one but I don't know the vendor id and such for a Logitech m535. Also Phoenix is and remix os are old at this point and don't seem like there's been updates since about 2018.
This is the most accurate problem (which I am having) description and research on the internet.
Sadly no news I believe?
Of course if you only need to forward mouse to PC you can use virtualhere. Quite expensive piece of software 25$ with current 50% discount. And needs to purchase new one on new Android device
I am using latest PrimeOS Mainline in a quad boot system with a logitech K400r wireless keyboard/trackpad. I tried to change the right mouse button behavior but failed. I am writing what I learned/did before giving up as it might aid others with troubleshooting similar issues.
Problem:
Right mouse button clearly does not act as back button and it is really annoying if you are used to the default behaviour.
Right mouse button seems to be same as left mouse button (possibly long click lmb) unless right click on desktop icon and works as menu button. Looks like they try and make rmb like windows where you are supposed to get a context menu.
Troubleshooting Steps:
Make backup of PrimeOS partition (just in case).
Identify keyboard and get vendor and product id.
Code:
cat /sys/kernel/debug/usb/devices
I check the output and get vendor=046d product=c52b.
Now create custom files for my keyboard. Don't want to mess with generic files. Input device files are located in /system/usr on my device. Some devices use /vendor/usr or /odm/usr for these files. A rough idea for the search path order here https://source.android.com/devices/input/input-device-configuration-files. I am in terminal as root user and /system folder has RW access.
Code:
cd /system/usr/keylayout
cp Generic.kl Vendor_046d_Product_c52b.kl
chmod 644 Vendor_046d_Product_c52b.kl
cd /system/usr/keychars
cp Generic.kcm Vendor_046d_Product_c52b.kcm
chmod 644 Vendor_046d_Product_c52b.kcm
I examine the files and nothing in particular stands out as a problem. I compare files with files from another device where the keyboard works as expected, again nothing stands out.
I begin troubleshooting further. I identify input stream from keyboard.
Code:
getevent -p
From the list I find my keyboard interacts via /dev/input/event10.
Now I can view the scan codes for keyboard.
Code:
getevent -l /dev/input/event10
Right mouse button gives EV_MSC MSC_SCAN 00090002 and EV_KEY BTN_RIGHT. This seems normal. I do the same for working device and get same codes.
I try and add line 'key usage 0x090002 BACK' to .kl file in the 'keys defined by HID usages' section but this does not work (yes I rebooted after).
Conclusions:
Doesn't look like you can change right mouse button behavior using config files in this instance. Perhaps problem in kernel. AndroidX86 does not have this issue but doesn't have the great UI.
Might be able to mod /system/framework/hid.jar or /system/framework/input.jar perhaps.
PrimeOS should have provided an option in settings to change rmb behavior if they veered away from the default usage. I'll post on PrimeOS thread.
Use esc key instead
I know this thread is old, but did anyone find solution to this? Remapping mouse clicks is the only thing I can't remap as well. Quite frustrating! Any help is greatly appreciated. I'm rooted on LineageOS via Magisk on an Onn box (Android TV)