[how-to] remap genius key - myTouch 3G Slide Android Development

1) Boot in to ClockworkMod Recovery
2) mount /system from partitions menu
3) adb pull /system/usr/keylayout/latte-keypad-v2.kl latte-keypad-v2.kl
4) Edit file locally, the genius key is: key 187 (make a backup of the original file first)
5) adb push latte-keypad-v2.kl /system/usr/keylayout/
6) Reboot
For more information on remapping keys see: http://forum.xda-developers.com/showthread.php?t=695936
If you want the genius button remaped to ENDCALL (if on a call it will end the call, if not on a call it will lock the screen, if you hold it down it activates the power button menu) and don't won't to edit the file yourself you can download this premodified version, just place it in the directory you are running adb from and skip steps 3&4): http://www.4shared.com/file/ein06_25/latte-keypad-v2.html
Notes:
There is a slight hardware delay on the button press, so whatever you assign it to you need to hold the button for half a second just like with the current genius app.
It does not seem to be any easy task to be able to call an alternate application, for now, you can only reassign the key to something another key already does (letter/number, end call, power, volume, camera, etc.). I'm currently working on being able to call an alternate application.

falken98 said:
1) Boot in to ClockworkMod Recovery
2) mount /system from partitions menu
3) adb pull /system/usr/keylayout/latte-keypad-v2.kl
4) Edit file locally, the genius key is: key 187
5) adb push /system/usr/keylayout/latte-keypad-v2.kl
6) Reboot
For more information on remapping keys see: http://forum.xda-developers.com/showthread.php?t=695936
Click to expand...
Click to collapse
Well, how about that. Great find, falken98!
Complete aside: Is your handle taken from the movie "WarGames"? If so, awesome.
So what are people planning to map to this particular hardware key?

and would we easily be able to make this a end call/sleep key? if so what needs to be changed

kingofyo1 said:
and would we easily be able to make this a end call/sleep key? if so what needs to be changed
Click to expand...
Click to collapse
Sure can, to make end call just change:
key 187 FUNC_4
to:
key 187 ENDCALL WAKE_DROPPED

HebrewToYou said:
Complete aside: Is your handle taken from the movie "WarGames"? If so, awesome.
Click to expand...
Click to collapse
haha. yes, it is. nice catch!

and what about the sleep functionality like on the old mytouch?

YESSS
i started a thread on this and was hard into figureing this out
thanks for the help

kingofyo1 said:
and what about the sleep functionality like on the old mytouch?
Click to expand...
Click to collapse
That i'm not sure about, i'll do some digging and see.

kingofyo1 said:
and would we easily be able to make this a end call/sleep key? if so what needs to be changed
Click to expand...
Click to collapse
glad you asked this, that is what i want my genius button to be and it bugs me that it's not since i hit it all the time when trying to hang up on people(came from G1 so that's where my button was) i will do this later
managed to switch fn and menu on hw keyboard, it was bugging me that i constantly hit menu when trying to hit fn(bad button planning by HTC) but now i have the keys where i want them may have to make a few changes later as well to other stuff(camera and focus should do something else)

its not working whenever i put in adb pull "" it just gives me all the adb options..

kingofyo1 said:
and would we easily be able to make this a end call/sleep key? if so what needs to be changed
Click to expand...
Click to collapse
This is actually working this way for me. If on a call, I can hold it for about half a second, it will end the call. Press it for half a second again, it will put it to sleep. If I press and hold the key, it will bring up the Power options menu. This is after I mapped key 187 to ENDCALL WAKE_DROPPED.
Edit: Also, I love "187" being the Genius key

squidbutt said:
its not working whenever i put in adb pull "" it just gives me all the adb options..
Click to expand...
Click to collapse
Sure you have it typed correctly?
D:\android-sdk-windows\key> adb pull /system/usr/keylayout/latte-keypad-v2.kl
358 KB/s (3675 bytes in 0.010s)

fermunky said:
This is actually working this way for me. If on a call, I can hold it for about half a second, it will end the call. Press it for half a second again, it will put it to sleep. If I press and hold the key, it will bring up the Power options menu. This is after I mapped key 187 to ENDCALL WAKE_DROPPED.
Click to expand...
Click to collapse
That does turn out rather well for that button! No more annoying "say a command".

to make it a search key I:
key 187 FUNC_4
to:
key 187 SEARCH
??

Great find man, I switched it to end call/dropped too and its working perfectly. If anyone figures out before I do to make it the sleep function please post.

FYI, after you remap the key it seems to be safe to go ahead and remove:
vsuite.apk, vsuite.odex, VSuiteApp.apk, VSuiteApp.odex
If you have no interest in the genius button function.

what does the WAKE_DROPPED mean
btw when I pull the file where does it pull to? my sdcard or do I have to put a directory? Someone should just upload the stock file

turboyo said:
what does the WAKE_DROPPED mean
Click to expand...
Click to collapse
WAKE: When this key is pressed while the device is asleep, the device will wake up and the key event gets sent to the app.
WAKE_DROPPED: When this key is pressed while the device is asleep, the device will wake up and the key event does not get sent to the app.
If we figure out how to put the device the sleep there would actually be a difference.

turboyo said:
btw when I pull the file where does it pull to? my sdcard or do I have to put a directory? Someone should just upload the stock file
Click to expand...
Click to collapse
It pulls it to the computer you ran adb from (in the directory you are in), you then edit the file with a text editor and push it back up.
Since you have to edit the file and push it back you might as well just go ahead and pull it first, seems more annoying to try and download it first.

Im getting the same thing with it just listing all the adb commands.. Ahh things like this were so much easier with SUFBS lol, all I would have to do is go to the directory and edit the file right in there

Related

Disable Camera Buttons on Side

Hey People,
I was wondering if there was a way to disable the Camera & Video buttons on the side of the phone. When in my pocket or in the case I have noticed that they have been activated and pics n videos have been taken.
I always have my phone on the locked screen but even if screen is locked and you press those 2 buttons they get activated and could take pics or videos without you even knowing.
Any suggestions would help.....
Thanks....
henry1970 said:
Hey People,
I was wondering if there was a way to disable the Camera & Video buttons on the side of the phone. When in my pocket or in the case I have noticed that they have been activated and pics n videos have been taken.
I always have my phone on the locked screen but even if screen is locked and you press those 2 buttons they get activated and could take pics or videos without you even knowing.
Any suggestions would help.....
Thanks....
Click to expand...
Click to collapse
Maybe try getting bigger pockets? Lol. =P
Do you have a case on it? I'm using a d30 case and have never had any pictures taken in my pocket.
Sent from my world to yours using my HTC Amaze
Yes, I have a case. Not the d30 and it is open where those buttons are..
Angelus47 said:
Do you have a case on it? I'm using a d30 case and have never had any pictures taken in my pocket.
Sent from my world to yours using my HTC Amaze
Click to expand...
Click to collapse
widget locket lets you disable these buttons when the phone is locked...Its an awesome program I would invest it it! no root needed
henry1970 said:
Hey People,
I was wondering if there was a way to disable the Camera & Video buttons on the side of the phone. When in my pocket or in the case I have noticed that they have been activated and pics n videos have been taken.
I always have my phone on the locked screen but even if screen is locked and you press those 2 buttons they get activated and could take pics or videos without you even knowing.
Any suggestions would help.....
Thanks....
Click to expand...
Click to collapse
This is an easy fix(with just about no risk) if you have a rooted phone, even easier if you have root explorer..
I'll provide directions as if you have root explorer: navigate to /system/usr/keylayout/ruby-keypad.kl long press and click edit in text
You should see:
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
# CAMCORDER
key 248 CAMCORDER [B]WAKE[/B]
# CAMERA
key 211 FOCUS
key 212 CAMERA [B]WAKE[/B]
Delete just the bolded part above that says wake next to the Camcorder key and Camera key, that is what tells the phone to wake up when you hit the button. If you do it in the root explorer method it will automatically create a backup of the file in that directory. Restart the phone and you're good. Both buttons will still work when you've already woken the phone up, but will no longer wake the phone up itself resulting in pics/video in your pocket.
If you don't have root explorer, you can try to find some other app that allows you to edit documents with root, or use adb to pull the file then push the modified file back into that folder..
Hope this helps
Silentbtdeadly said:
This is an easy fix(with just about no risk) if you have a rooted phone, even easier if you have root explorer..
I'll provide directions as if you have root explorer: navigate to /system/usr/keylayout/ruby-keypad.kl long press and click edit in text
You should see:
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
# CAMCORDER
key 248 CAMCORDER [B]WAKE[/B]
# CAMERA
key 211 FOCUS
key 212 CAMERA [B]WAKE[/B]
Delete just the bolded part above that says wake next to the Camcorder key and Camera key, that is what tells the phone to wake up when you hit the button. If you do it in the root explorer method it will automatically create a backup of the file in that directory. Restart the phone and you're good. Both buttons will still work when you've already woken the phone up, but will no longer wake the phone up itself resulting in pics/video in your pocket.
If you don't have root explorer, you can try to find some other app that allows you to edit documents with root, or use adb to pull the file then push the modified file back into that folder..
Hope this helps
Click to expand...
Click to collapse
Thanks dude! I was looking for an easy way in the system to do that but couldn't find it. Works like a charm. You're the man!!
Silentbtdeadly said:
This is an easy fix(with just about no risk) if you have a rooted phone, even easier if you have root explorer..
I'll provide directions as if you have root explorer: navigate to /system/usr/keylayout/ruby-keypad.kl long press and click edit in text
You should see:
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
# CAMCORDER
key 248 CAMCORDER [B]WAKE[/B]
# CAMERA
key 211 FOCUS
key 212 CAMERA [B]WAKE[/B]
Delete just the bolded part above that says wake next to the Camcorder key and Camera key, that is what tells the phone to wake up when you hit the button. If you do it in the root explorer method it will automatically create a backup of the file in that directory. Restart the phone and you're good. Both buttons will still work when you've already woken the phone up, but will no longer wake the phone up itself resulting in pics/video in your pocket.
If you don't have root explorer, you can try to find some other app that allows you to edit documents with root, or use adb to pull the file then push the modified file back into that folder..
Hope this helps
Click to expand...
Click to collapse
You think this would work if instead of camera I type the name of another camera app that I consider to be better than the stock camera?
Sent from my HTC Amaze 4G using xda premium
frodoboy said:
Thanks dude! I was looking for an easy way in the system to do that but couldn't find it. Works like a charm. You're the man!!
Click to expand...
Click to collapse
I was glad I was able to help
Felinos11 said:
You think this would work if instead of camera I type the name of another camera app that I consider to be better than the stock camera?
Sent from my HTC Amaze 4G using xda premium
Click to expand...
Click to collapse
You don't want to change what the button does through that file, however if you get an app like tasker you could then remap the camera button to a different app or maybe a shortcut.. There also is probably a pretty easy way to replace the stock app with whatever you're trying to use(maybe rename the camera app's apk to whatever the stock one is called, and replace it in the system folder?), but you'd have to ask a dev to be sure.
That worked great, thanks!!
My phone is now happy knowing it won't have 100 black photos and dark random pocket videos!!
Another option if you want to do it for free on the phone is load on terminal emulator, and busybox.
Open the terminal emulator, run su and allow superuser permissions.
Remount /system as RW: mount -o remount,rw /dev/block/mtdblock4 /system
browse to the /system/usr/keylayout (use cd command)
edit it with vi: vi ruby-keypad.kl (may need to type busybox vi ruby-keypad.kl)
Hold down the volume up button and type S to lower the cursor down a row, go down to the first row to delete the WAKE and then do a Volume Up Key and press d to move the cursor over to the right. Have it stop so it's blinking over the W in WAKE. type dw That should have removed the word wake. Do the volume up and S and D to go down to the last WAKE to remove and do a dw again. They should both now be removed. Now type :wq <return> That should write the file and quit. Reboot the phone. Embrace saving the 3.99 over root explorer.

[Q] Remapping video or camera button?

I don't even have my Amaze yet, but one of the things I know I'm interested in is remapping the dedicated video button. I know I'll probably love the dedicated camera button, but I doubt I'll use the video button- mapping the button to either an app to it or a more useful function would be nice.
That said, has anyone decided to change the button functions and if so what did you use? What function did you give it?
I found a thread here that sounds like it could work except it makes a big deal out of needing "for full rooted devices. (NAND unlocked. Full, permanent write access to the system dir is needed)" and the functions it can provide don't seem all that helpful..
I did a fair amount of searching and couldn't find a better app, I'm not sure if the root the amaze has would be considered "full root", or if anyone here has really played with this.
check out Tasker from the market. It's basically a simple programming environment.
Think of it as writing a IF-THEN statements..
IF this THEN that....
IF i press the X button THEN open program y
If I press the Z button THEN send my girlfriend a text message with body of 'i just clicked my record button and it sent you a text message'
IF its 4o'clock on tuesday and i clicked the camera button then open angry birds
etc
etc
etc
jo093142 said:
check out Tasker from the market. It's basically a simple programming environment.
Think of it as writing a IF-THEN statements..
IF this THEN that....
IF i press the X button THEN open program y
If I press the Z button THEN send my girlfriend a text message with body of 'i just clicked my record button and it sent you a text message'
IF its 4o'clock on tuesday and i clicked the camera button then open angry birds
etc
etc
etc
Click to expand...
Click to collapse
Haha, you know, that really does seem like the simplest answer. I tried tasker but was a little frustrated that you had to manually follow steps to re-create the same function someone else has gotten, and there was nothing I wanted my phone to do I felt like was worth that kind of time investment.. but simple tasks like this it totally makes sense!(And just curious, did I miss something, and there was a way to copy someone's script/code into tasker rather than input it manually?)
Thanks for the idea, I'm definitely going to give it a try!
Edit: And I just noticed that you only have two posts, welcome to XDA! If by your second post you've already helped a semi-veteran, you're definitely going to be a great addition to the community
Silentbtdeadly said:
Haha, you know, that really does seem like the simplest answer. I tried tasker but was a little frustrated that you had to manually follow steps to re-create the same function someone else has gotten, and there was nothing I wanted my phone to do I felt like was worth that kind of time investment.. but simple tasks like this it totally makes sense!(And just curious, did I miss something, and there was a way to copy someone's script/code into tasker rather than input it manually?)
Thanks for the idea, I'm definitely going to give it a try!
Edit: And I just noticed that you only have two posts, welcome to XDA! If by your second post you've already helped a semi-veteran, you're definitely going to be a great addition to the community
Click to expand...
Click to collapse
been looking for the same thing, however I could find a camcorder button in Tasker, only the camera button.
bummer
mikeschevelle said:
been looking for the same thing, however I could find a camcorder button in Tasker, only the camera button.
bummer
Click to expand...
Click to collapse
I don't have the phone yet or I would already be playing with this, but I imagine you could remap the button to a key that tasker does support.
Of course back up the original file, then use adb(or even root explorer for such a small text edit) to pull/push adb pull /system/usr/keylayout/ruby-keypad.kl
You should see:
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
# CAMCORDER
key 248 [B]CAMCORDER[/B] WAKE
# CAMERA
key 211 FOCUS
key 212 CAMERA WAKE
Change just the bolded part above that says CAMCORDER to something our phone doesn't have that tasker recognizes(I don't know what options it has, something like "DPAD_CENTER" might work)
At least that is the first thing I was going to try.
Silentbtdeadly said:
I don't have the phone yet or I would already be playing with this, but I imagine you could remap the button to a key that tasker does support.
Of course back up the original file, then use adb(or even root explorer for such a small text edit) to pull/push adb pull /system/usr/keylayout/ruby-keypad.kl
You should see:
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
# CAMCORDER
key 248 [B]CAMCORDER[/B] WAKE
# CAMERA
key 211 FOCUS
key 212 CAMERA WAKE
Change just the bolded part above that says CAMCORDER to something our phone doesn't have that tasker recognizes(I don't know what options it has, something like "DPAD_CENTER" might work)
At least that is the first thing I was going to try.
Click to expand...
Click to collapse
.......appreciate it......over my head though

[Q] any key droid x2 screen awake

Is there a way to have any hard key unlock the droid x2
I do remember reading about this in the developement section. There's something to change in one of the scripts, but I don't remember exactly where or what it was. Try the search or browse around a bit. It's there.
Sorry I wasn't much help.
If you flash CM7 you can have the home key and volume keys unlock the screen.
Settings--CyanogenMod settings--Input--check the box for "volume rocker wake."
I think "home key wake" might be on by default.
Read through this thread:
http://forum.xda-developers.com/showthread.php?t=1403013
I asked the same question in there. There is a file you can edit that can change the actions of the hard buttons. Just be sure to make a backup of the original file when you do it.
EDIT: Not sure if you have to have a certain amount of posts to see links. So heres a quick summary.
In a file explorer, go to /system/usr/keylayout. Open the tegra-kbc.kl file in a text editor (You have to give read/write permissions to edit and save this file on your phone) and you can change the menu, back, search and volume buttons from WAKE_DROPPED to WAKE. Notice how the home button is the only one set to "WAKE". This will make all the buttons wake from the screen being off like the home button does. Again, backup the file first in case something doesnt work right. Im not responsible if you mess something up. But this should work fine.
When I first did this, I did that to the volume buttons and it worked. So it should work with the other buttons as well.
They won't take until after a reboot. I edited the same file to make my search button open my camera.
Sent from my CM7 DEATHMACHINE!
Thanks everyone
I tried this b4 and did something wrong as the phone went dark and would not turn on. Somehow I got to factory reboot and brought it to VW and they replaced.
jsgraphicart said:
Read through this thread:
http://forum.xda-developers.com/showthread.php?t=1403013
I asked the same question in there. There is a file you can edit that can change the actions of the hard buttons. Just be sure to make a backup of the original file when you do it.
EDIT: Not sure if you have to have a certain amount of posts to see links. So heres a quick summary.
In a file explorer, go to /system/usr/keylayout. Open the tegra-kbc.kl file in a text editor (You have to give read/write permissions to edit and save this file on your phone) and you can change the menu, back, search and volume buttons from WAKE_DROPPED to WAKE. Notice how the home button is the only one set to "WAKE". This will make all the buttons wake from the screen being off like the home button does. Again, backup the file first in case something doesnt work right. Im not responsible if you mess something up. But this should work fine.
When I first did this, I did that to the volume buttons and it worked. So it should work with the other buttons as well.
Click to expand...
Click to collapse

[Q] Disabled Capacitive Keys - all but Home

I started this in another thread but I thought I'd drop it here in case anyone else wants to work on it as well. I didn't see another active thread so please flame if this isn't in the right place.
Being on tablet mode full time I wanted to disable the capacitive keys. They're not in the way or totally useless, I simply wanted to see if it could be done.
I've managed to disable Menu, Search and Back on mine with an older Honeycomb trick I used on the Galaxy Tab. I just now started monkeying with this on the Note and I've yet to disable the Home button without also disabling waking with power button.
Root Browse your way to "system/usr/keylayout/Generic.kl
Place a # before the following lines (commenting them), save then reboot:
key 139 MENU
key 158 BACK
key 217 SEARCH
I've tried changing key 102 and key 172 to disable the Home key to no avail. Commenting 102 seems to have no effect and commenting out 172 disables waking with the power button.
I'm no developer but it seems to me that the Home key and the power button are somehow linked. Maybe someone that has a firmer grasp of what they're doing within the OS can give some insight?
Hey thanks again for this find.... Just a quick question.
Does this method work with any ICS ROM? Also I'm just curious which ROM you are using and want to hear your recommendation.
Thanks again
sunshines4u said:
Hey thanks again for this find.... Just a quick question.
Does this method work with any ICS ROM? Also I'm just curious which ROM you are using and want to hear your recommendation.
Thanks again
Click to expand...
Click to collapse
I haven't tried it on a GB ROM but I see no reason it wouldn't work there or on any ICS build. From what little knowledge I have of how this works I can't see why the key bindings would be any different from ROM to ROM, as long as it's for the Note. For all I know the same lines of code could be the same on any number of Samsung devices.
I'm currently on DAGr8s The Hybrid_RCIV and enjoying it very much. Aside from having to pop my SD card whenever I install an app it's the bee's knees.
VonLaserface said:
I started this in another thread but I thought I'd drop it here in case anyone else wants to work on it as well. I didn't see another active thread so please flame if this isn't in the right place.
Being on tablet mode full time I wanted to disable the capacitive keys. They're not in the way or totally useless, I simply wanted to see if it could be done.
I've managed to disable Menu, Search and Back on mine with an older Honeycomb trick I used on the Galaxy Tab. I just now started monkeying with this on the Note and I've yet to disable the Home button without also disabling waking with power button.
Root Browse your way to "system/usr/keylayout/Generic.kl
Place a # before the following lines (commenting them), save then reboot:
key 139 MENU
key 158 BACK
key 217 SEARCH
I've tried changing key 102 and key 172 to disable the Home key to no avail. Commenting 102 seems to have no effect and commenting out 172 disables waking with the power button.
I'm no developer but it seems to me that the Home key and the power button are somehow linked. Maybe someone that has a firmer grasp of what they're doing within the OS can give some insight?
Click to expand...
Click to collapse
May have to also edit some of the other key layout files. Like ffa, not entirely sure what they all do, but I have seen home key in done of the other layouts.
Sent from my bigass phone or whatever on ICS
VonLaserface said:
I've tried changing key 102 and key 172 to disable the Home key to no avail. Commenting 102 seems to have no effect and commenting out 172 disables waking with the power button.
I'm no developer but it seems to me that the Home key and the power button are somehow linked. Maybe someone that has a firmer grasp of what they're doing within the OS can give some insight?
Click to expand...
Click to collapse
Just an FYI - I was able to disable all of the keys using melfas_touchkey.kl on the new CM9 Unofficial release. Power still works.
jpg71 said:
Just an FYI - I was able to disable all of the keys using melfas_touchkey.kl on the new CM9 Unofficial release. Power still works.
Click to expand...
Click to collapse
Where can I get that file and where do I put it on the phone?

Remap Hardware Buttons?

So I want to remap the hardware buttons, but ran into some issues:
google searches say to edit the /system/usr/keylayout/sec_touchkey.kl (for previous galaxy devices), but this file is mysteriously absent on my stock rooted s4.
I tried other files in this /system/usr/keylayout/ folder; atmel_mxt_ts.kl seemed promising in its content:
Code:
key 139 MENU
key 102 HOME
key 158 BACK
key 217 SEARCH
Changing these, however, did nothing.
Am I searching in the right place, just in the wrong files? Is there a file chmod permission I might be missing?
I think there was also a jar file (android.policy.jar?) I'd have to decompile if I wanted to change the long-press actions for these buttons?
Can I override the double-press home button to do something different than s-voice? (I know I can disable the app itself)
Thanks!
disable the button
Mix3d said:
So I want to remap the hardware buttons, but ran intofiles into some issues:
google searches say to edit the /system/usr/keylayout/sec_touchkey.kl (for previous galaxy devices), but this file is mysteriously absent on my stock rooted s4.
I tried other files in this /system/usr/keylayout/ folder; atmel_mxt_ts.kl seemed promising in its content:
Code:
key 139 MENU
key 102 HOME
key 158 BACK
key 217 SEARCH
Changing these, however, did nothing.
Am I searching in the right place, just in the wrong files? Is there a file chmod permission I might be missing?
I think there was also a jar file (android.policy.jar?) I'd have to decompile if I wanted to change the long-press actions for these buttons?
Can I override the double-press home button to do something different than s-voice? (I know I can disable the app itself)
Thanks!
Click to expand...
Click to collapse
I was also looking all over for this. Did what you did and also other. kl in the system usr no change also . Using 3minit mod. Wanted to disable the hardware button as having the navigation bar and therefore now having two back button.
Anyone here with any idea to share?
kelvinator said:
I was also looking all over for this. Did what you did and also other. kl in the system usr no change also . Using 3minit mod. Wanted to disable the hardware button as having the navigation bar and therefore now having two back button.
Anyone here with any idea to share?
Click to expand...
Click to collapse
i dont have an S4 at the moment and i cant remember the exact file name but its under system/usr/keylayout looking through a rom file i think its gpio-keys.kl just mount the folder as read/write then comment out the lines you dont want using # then reboot
what did you do to enable the navbar when i had i was using an S4 last week the only way i could get it working was with an AOSP rom which meant no samsung camera or IR
*edit i should add that this was on the verizon S4
success disable hardware back button
I finally managed to disable the button. Its in system/usr/generic.kl . Place# infront of key 159 back and reboot. Done.
Got navigation bar using 3minit setting and mod.
If it works for you hitting the Thanks button will help. Cheers
---------- Post added at 05:28 AM ---------- Previous post was at 05:25 AM ----------
Correction. In system/usr/keylayout/generic.kl.
I am on omega v6.0 with 3minit mod.
kelvinator said:
I finally managed to disable the button. Its in system/usr/generic.kl . Place# infront of key 159 back and reboot. Done.
Got navigation bar using 3minit setting and mod.
If it works for you hitting the Thanks button will help. Cheers
---------- Post added at 05:28 AM ---------- Previous post was at 05:25 AM ----------
Correction. In system/usr/keylayout/generic.kl.
I am on omega v6.0 with 3minit mod.
Click to expand...
Click to collapse
Good to know, but my use case is a little different... I'm hoping to swap/ change the soft keys, not disable.
But if generic.kl worked for you, that's a good place for me to start. Will play around and post back if I can swap the menu/back button, hopefully the long press options as well. Ideally I want to move a lot of things around, (long press home for gnow, back to recent, long for menu, menu to back) but we'll see.
I'm on stock rooted, which is why I still need functionality
based on how I see it. I think it could be done
I will try it out if I could swap the menu and home like how you wanted. But you definitely need to be rooted first to edit the files
tried it changing key 139 MENU with BACK. saved reboot with success. Menu function swap to back function.
rem you got to be rooted for this to work. ..
kelvinator said:
I will try it out if I could swap the menu and home like how you wanted. But you definitely need to be rooted first to edit the files
tried it changing key 139 MENU with BACK. saved reboot with success. Menu function swap to back function.
rem you got to be rooted for this to work. ..
Click to expand...
Click to collapse
Is a long press registered as a different key for mapping purposed?
Like menu button is 001 but long press menu is 002?
Ultimately I'd like to be able to make a long press on the home button turn the screen off. That's my end goal with that question.
Mix3d said:
Good to know, but my use case is a little different... I'm hoping to swap/ change the soft keys, not disable.
But if generic.kl worked for you, that's a good place for me to start. Will play around and post back if I can swap the menu/back button, hopefully the long press options as well. Ideally I want to move a lot of things around, (long press home for gnow, back to recent, long for menu, menu to back) but we'll see.
I'm on stock rooted, which is why I still need functionality
Click to expand...
Click to collapse
In the generic.kl file, just change the labels to what you want. For instnace, where it says 117 VOLUME_UP WAKE (thats just an example) remove the volume_up and put MENU or BACK or whatever you want there.
Skipjacks said:
Is a long press registered as a different key for mapping purposed?
Like menu button is 001 but long press menu is 002?
Ultimately I'd like to be able to make a long press on the home button turn the screen off. That's my end goal with that question.
Click to expand...
Click to collapse
The system interupts the key down press, it then launches a post delayed runnable when you press down, if the key is pressed down for the length of that post delayed, then essentially "long press" has been executed. The runnable then consumes the the original key press to prevent the key from executing.
elesbb said:
In the generic.kl file, just change the labels to what you want. For instnace, where it says 117 VOLUME_UP WAKE (thats just an example) remove the volume_up and put MENU or BACK or whatever you want there.
The system interupts the volume down press, it then launches a post delayed runnable when you press down, if the key is pressed down for the length of that post delayed, then essentially "long press" has been executed. The runnable then consumes the the original key press to prevent the key from executing.
Click to expand...
Click to collapse
Right, so then how do we override the long press?
Mix3d said:
Right, so then how do we override the long press?
Click to expand...
Click to collapse
If you are trying to do it via the system. Meaning overriding system button presses, then you will have to edit the smali code. I believe the method is interceptKeyBeforeQueing or something like that.
where the hell is the 'soft' back button on this phone? so annoying i can't find it! or do i need to use a 3rd party launcher and rid of that stock touchwiz crap...phone is not rooted
cobyman7035 said:
where the hell is the 'soft' back button on this phone? so annoying i can't find it! or do i need to use a 3rd party launcher and rid of that stock touchwiz crap...phone is not rooted
Click to expand...
Click to collapse
You are in the wrong place, bud. Please ask questions like this in the q and a forum. This is a development forum for development related discussion.
And do try to be a tad calmer when posting. There are tons of people who will be happy to help. But the aggressive tone of your post will prevent many people from wanting to assist.
Also...really? Its the arrow to the right of the home button on the bottom right of the phone.
Sent from your phone. You should be careful where you leave that thing.
Found this at the AOSP Site:
http://source.android.com/tech/input/key-layout-files.html
Key layout files are located by USB vendor, product (and optionally version) id or by input device name.
The following paths are consulted in order.
Code:
/system/usr/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl
/system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl
/system/usr/keylayout/DEVICE_NAME.kl
/data/system/devices/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl
/data/system/devices/keylayout/Vendor_XXXX_Product_XXXX.kl
/data/system/devices/keylayout/DEVICE_NAME.kl
/system/usr/keylayout/Generic.kl
/data/system/devices/keylayout/Generic.kl
Click to expand...
Click to collapse
Another potentially useful resource is this list of keycodes:
http://source.android.com/tech/input/keyboard-devices.html
I haven't had time to play much with this stuff yet, but I DID try the KeynrTracker.apk listed here, however it does not seem to register any of the long presses, leaving us only with menubutton as 139 and back as 158. It could have something to do with the way this app is designed, or in the way Samsung is firing these button presses.
More to come.
Mix3d said:
Found this at the AOSP Site:
http://source.android.com/tech/input/key-layout-files.html
Another potentially useful resource is this list of keycodes:
http://source.android.com/tech/input/keyboard-devices.html
I haven't had time to play much with this stuff yet, but I DID try the KeynrTracker.apk listed here, however it does not seem to register any of the long presses, leaving us only with menubutton as 139 and back as 158. It could have something to do with the way this app is designed, or in the way Samsung is firing these button presses.
More to come.
Click to expand...
Click to collapse
I already explained how long presses work
Sent from my SGH-M919 using Tapatalk 2
elesbb said:
I already explained how long presses work
Sent from my SGH-M919 using Tapatalk 2
Click to expand...
Click to collapse
"Edit the smali code" doesn't really count... what file to decompile? Which lines?
I'm completely new to this level of android modifications
Can this be used to make "Menu" button work as recents and "Menu hold" as menu?
jastonas said:
Can this be used to make "Menu" button work as recents and "Menu hold" as menu?
Click to expand...
Click to collapse
I have changed menu to recents. Just edit the file in system/usr
I haven't changed 'menu hold' to menu yet, requires decompiling and I'm lazy.
3473 said:
I have changed menu to recents. Just edit the file in system/usr
I haven't changed 'menu hold' to menu yet, requires decompiling and I'm lazy.
Click to expand...
Click to collapse
Then how do you use the menu of so many apps that don't have the 3 dots?
3473 said:
I have changed menu to recents. Just edit the file in system/usr
I haven't changed 'menu hold' to menu yet, requires decompiling and I'm lazy.
Click to expand...
Click to collapse
decompiling WHICH file? throw me a bone, dude!
Mix3d said:
decompiling WHICH file? throw me a bone, dude!
Click to expand...
Click to collapse
That's what Google is for! We all started there!! I'll give you a hunt it lies within system/framework directory and starts with an a ^-^
Sent from my SGH-M919 using Tapatalk 2

Categories

Resources