Change on-screen softkey navbar button actions on Stock ROM? - Android Q&A, Help & Troubleshooting

Hey guys, got a quick question. I have a Leagoo M8 which uses softkeys for navigation. Now normally this is OK, but for some crazy reason Leagoo decided that it would be a great idea to completely change their actions. Currently they have the following actions:
Tap Recents button = Menu
Long Press Recents button = Search
Long Press Home button = Recents
Typically softkeys have the following actions:
Tap Recents button = Recents
Long Press Recents button = Nothing, or Menu
Long Press Home button = Assistant
As someone who has used nexus and other devices in the past, this behaviour is really annoying. I don't want to have to reply on Xposed or Root as there are apps which I want to run that do not allow root, so I'd like to change this on a ROM level.
The ROM I am using is a debloated stock Android 6.0 ROM which is mostly stock Android, which is available here: https://forum.xda-developers.com/android/development/6-0-lazy-s-debloated-rom-leagoo-m8-t3574816
I found this thread that explains how to change the look and feel of softkeys, but am I right in saying that this doesn't apply to changing button actions? A long time ago I remember that there used to be some XML files that could be edited which changed various button actions, but that would have been for Android 4.4, and I'm not sure how much different Android 6.0 is. If anyone would be able to point me in the right direction that would be super appreciated :good:

Maybe this will help: forums.androidcentral.com/ask-question/425026-change-function-long-press-search-softkey-home-key.html

piavr said:
Maybe this will help: forums.androidcentral.com/ask-question/425026-change-function-long-press-search-softkey-home-key.html
Click to expand...
Click to collapse
Ah, interesting. I've tried editing the config files with a text editor in the past and never had too much success, but something worth trying :good:

Alright, quick update. I updated Generic.kl but it doesn't seem to have any effect. I think it is only for physical keyboards, whist the Leagoo has softkeys. Any other ideas?

Related

[Q] [MOD] Replace menu button with recents

Since Android 4.0, Google has declared war on the menu button and all devices come out with Recents - Home - Back buttons.
Samsung for some reason decided to move forward with the menu button.
Would it be easy to remap the left capacitive button and make it show the recents instead of the menu action?
Does it really bother you that much to keep the hardware-button pressed down for like 1 second to display the 'Recent' list?
d4fseeker said:
Does it really bother you that much to keep the hardware-button pressed down for like 1 second to display the 'Recent' list?
Click to expand...
Click to collapse
It bothers me, that much
It bother me that much as well - it's just slow.
I think I'd prefer the mod to be double-click home button though, since I rarely use S Voice and it's no hassle to find and click the icon for it whenever I want to use it.
This bothers me too
Would be nice to have it on the menu button. Even an app/shortcut on the homescreen for it would be nice.
I wonder also if there is a way to limit the recent lists as well, if I don't check it sometimes the list can be massive - would be nice to limit this to like 5 items or something.
Olywa
Anyone who used the CM10 on screen nav buttons, knows how much better it is to have the recents key available on a beast like the sgs3.
I wish we could change it but I am afraid this will never be possible on a samsung rom
jastonas said:
Anyone who used the CM10 on screen nav buttons, knows how much better it is to have the recents key available on a beast like the sgs3.
I wish we could change it but I am afraid this will never be possible on a samsung rom
Click to expand...
Click to collapse
open up Generic.kl in /system/usr/keylayout
change
key 139 MENU
to
key 139 APP_SWITCH
that should work
graffixnyc said:
open up Generic.kl in /system/usr/keylayout
change
key 139 MENU
to
key 139 APP_SWITCH
that should work
Click to expand...
Click to collapse
That's half working. It does work as APP_SWITCH but Android doesn't recognize the lack of the MENU button so it's doesn't show the settings buttons that are needed in most applications.
cm10 has implemented the button remap feature. now you can easily change the menu button long press to recent apps in cm10
jastonas said:
That's half working. It does work as APP_SWITCH but Android doesn't recognize the lack of the MENU button so it's doesn't show the settings buttons that are needed in most applications.
Click to expand...
Click to collapse
Yeah, how do we let android recognize lack of menu button?
Sent from my GT-I9300 using Tapatalk 2
wednesday13 said:
Yeah, how do we let android recognize lack of menu button?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
If you disable the hardware buttons, it just does.
jastonas said:
If you disable the hardware buttons, it just does.
Click to expand...
Click to collapse
Damn, I guess I have to sacrifice without menu button
Sent from my GT-I9300 using Tapatalk 2

[Q] Button Macros

Hi everyone... I'm loving my new sgs3, I have rooted it and installed CWM but I haven't seen a rom I like yet... this is due to button macros. I was originally A sgs 1 user with the 4 carrier buttons and the drop to 3 is something I'm trying to fix. I was wondering if there was a way to recreate all the functionality that was in the sgs 1 buttons.
long press search = voice
long press menu = keyboard
long press home = multitasking
Now since the search button is gone (R.I.P.) I was wondering if any ROMS used a long press on the back button to create the global voice access. I'm assuming there are not so I was also wondering if there was a form of button marco app or something to recreate it... or if anyone could give me a noob's guide on button addressing so I could modify CM to get back button search... Thanks again everyone, I know I'm living in the past but I just miss my global search access.

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

[Q] Swap Home/Back buttons

Anyone know if it is possible to swap the mapping of the home/back buttons? I use the back button more often than the home button and find the location of the home button easier to reach in general. I realize I can't change the actual hardware icon ... looking for a software fix.
seattlecard said:
Anyone know if it is possible to swap the mapping of the home/back buttons? I use the back button more often than the home button and find the location of the home button easier to reach in general. I realize I can't change the actual hardware icon ... looking for a software fix.
Click to expand...
Click to collapse
You can try the "Xposed Additions" module that remaps hardware keys but not positive if it will work, never used it on this phone.
seattlecard said:
Anyone know if it is possible to swap the mapping of the home/back buttons? I use the back button more often than the home button and find the location of the home button easier to reach in general. I realize I can't change the actual hardware icon ... looking for a software fix.
Click to expand...
Click to collapse
There are some options that can help with this in the ViperMAX ROM:
1. In tweaks you can set custom mappings for short press, double press, long press and swipe action for the home hardware key. The same can be done for the back key (except for the swipe action, if I'm not mistaken).
2. You can enable PIE, which basically allows you to slide your finger from the side of the screen to pop-up customizable software buttons on the screen. I use this for the same reason you describe (to make my most common actions easily accessible with my right thumb). In-fact I use PIE to pop-up software buttons to do things like "back", "pull down notifications" and "home"...
If you take advantage of those tweaks, it is easily enough to suite your needs and more.
seattlecard said:
Anyone know if it is possible to swap the mapping of the home/back buttons? I use the back button more often than the home button and find the location of the home button easier to reach in general. I realize I can't change the actual hardware icon ... looking for a software fix.
Click to expand...
Click to collapse
Yes, it possible software wise. I'll pm how to. File explorer needed with root access.
It can be done with Sence or Aosp, stock or custom ROMs. I edit this ever device I have to suit my needs. I like running full screen, no status bar nor navigation bar. One reason I like my Max. Full 5.9 viewing area.
jerrycycle said:
Yes, it possible software wise. I'll pm how to. File explorer needed with root access.
It can be done with Sence or Aosp, stock or custom ROMs. I edit this ever device I have to suit my needs. I like running full screen, no status bar nor navigation bar. One reason I like my Max. Full 5.9 viewing area.
Click to expand...
Click to collapse
Could you PM me with your solution? Thanks.

[Guide] Replace MENU with Recent Apps on CM12.1

This guide is for the Note 3 Neo and should work on all variants.
If you're looking at this thread then you should have noticed that the Menu key on @FireLord 's CM12.1 is mapped to MENU and you can't change it from Buttons in Settings since it only has Power Button, Recents Button, Volume Button and Home button and no Menu Button.
Of course, there are a bunch of Xposed Modules such as MenuBegone available to do the same but if you'd rather not install anything or if you just like to mess with your phone then this is the guide to follow
So here's what you to do make your Menu key function as a Recent's key.
Download any Root Brower (I'd suggest the one included in Rom Toolbox)
Navigate to /system/usr/keylayout/Generic.kl
Open the File Generic.kl as a text file
Look for key 139 MENU in the list
Replace MENU with APP_SWITCH
Save and Reboot
Now your Menu key will function as a Recents Key and you'll also be able to change what tapping it and long-pressing it does through Buttons In Settings.
Thanks for the info.
but do you know how to enable vibration on them?
damadikaz said:
Thanks for the info.
but do you know how to enable vibration on them?
Click to expand...
Click to collapse
Oh I'm sorry, I'm afraid i don't know about that. All the vibrations are on and it seems only the Soft keys aren't vibrating. I'll fill you in if i do find something out though.
ICUDeadNaw said:
Oh I'm sorry, I'm afraid i don't know about that. All the vibrations are on and it seems only the Soft keys aren't vibrating. I'll fill you in if i do find something out though.
Click to expand...
Click to collapse
I've found temporary solution tbh, but it kinda weird. the softkey also vibrate when the screen is off.
http://forum.xda-developers.com/showthread.php?t=2152355
still searching for another solution tho.

Categories

Resources