Change action for hardware buttons - Xiaomi Redmi Note 3 Questions & Answers

Hey xda community,
i want to bind some actions to my hardware buttons since my ROM does not support doing it.
I want to bind home button "long push" to lock screen, long push of back button to kill app (present open) and long push of menu button for "menu" inside apps.
Any way to do it/tutorial? I don't want to use external apps like: Buttons remapper (no root).
Is there any way to add functions from other ROMs like (slim/RR/many others) to currently flashed ROM (caf)? Please help.

alreadyregistered said:
Hey xda community,
i want to bind some actions to my hardware buttons since my ROM does not support doing it.
I want to bind home button "long push" to lock screen, long push of back button to kill app (present open) and long push of menu button for "menu" inside apps.
Any way to do it/tutorial? I don't want to use external apps like: Buttons remapper (no root).
Is there any way to add functions from other ROMs like (slim/RR/many others) to currently flashed ROM (caf)? Please help.
Click to expand...
Click to collapse
Check for buttons inside settings.
Its like a basic feature in many ROMs (cm 14.1s citrus I guess many more )
If you are one MM u can use exposed gravity box(even on miui)
Slim 6 has option screen off

reddevils4017 said:
Check for buttons inside settings.
Its like a basic feature in many ROMs (cm 14.1s citrus I guess many more )
If you are one MM u can use exposed gravity box(even on miui)
Slim 6 has option screen off
Click to expand...
Click to collapse
Its true but caf/aosp roms dont have that option in settings, since they dont support hw REbinding i believe..
if there is another way to change actions, like modifying generic.kl or smthng...pls tell..that wud be much helpful

reddevils4017 said:
Check for buttons inside settings.
Its like a basic feature in many ROMs (cm 14.1s citrus I guess many more )
If you are one MM u can use exposed gravity box(even on miui)
Slim 6 has option screen off
Click to expand...
Click to collapse
Yes. Caf/aosp rom mostly don't have it.

TechNova said:
Its true but caf/aosp roms dont have that option in settings, since they dont support hw REbinding i believe..
if there is another way to change actions, like modifying generic.kl or smthng...pls tell..that wud be much helpful
Click to expand...
Click to collapse
Yes. I'm looking for that exact method. Any ideas?

Xposed- gravity box , that's what you need

harishmenace said:
Xposed- gravity box , that's what you need
Click to expand...
Click to collapse
Yep. but not for Nougat. I forgot to mention it...

Any ideas?

Related

[Q] Is there any way to enable stock Android virtual keys on mega 6.3?

Hi all,
Given the huge screen size of mega 6.3, i do not mind to use some space for the virtual keys of Android. I also do not want to use the physical home,back,menu keys on the phone.
Is there any way to enable the Android virtual keys so that it will look like the nexus, sony xperia z... etc
Thanks.
xokachung said:
I also do not want to use the physical home,back,menu keys on the phone.
.
Click to expand...
Click to collapse
I have to ask why? What could be easier than the real keys?
The clicky home button is really really annoying to me...
I also want the multi task virtual key so no need to press the clicky home key and wait wait wait...
xokachung said:
The clicky home button is really really annoying to me...
I also want the multi task virtual key so no need to press the clicky home key and wait wait wait...
Click to expand...
Click to collapse
You can use Pie control or Button Saviour from the Play store to have on screen buttons.
Settings > My Device > Accessibility > Under Mobility Enable "Assistant Menu"
thanks all for your replies, i digged around xda forum and found that adding
qemu.hw.mainkeys=0
to system/build.prop can show the softkeys just like stock android
xokachung said:
thanks all for your replies, i digged around xda forum and found that adding
qemu.hw.mainkeys=0
to system/build.prop can show the softkeys just like stock android
Click to expand...
Click to collapse
error message "system ui stopped" when i do that... did anyone enabled the navbar successfully?
ararr said:
error message "system ui stopped" when i do that... did anyone enabled the navbar successfully?
Click to expand...
Click to collapse
Anyone could help on this
Hi,
i am also searching for a solution to enable the soft keys, but failed with the same error massage...:crying:
The mentioned tools are all not completely satisfying me needs.....is it really so difficult to enable the original Android 4.x soft keys
CU,
jonnypille
I don't know if it works, but there's already a thread about the NavBar(virtual keys). I needs a modified SystemUI tho.
http://forum.xda-developers.com/showthread.php?t=2399312
it didnt work for me:crying:

How to change Recent Apps button to Menu button?

Has anyone tried to find a way to change the recent apps button to Menu button? I think that it is more convenient and the recent apps could pop up with long press of the button.
No, because no one would want that (well, besides LG).
I guess you can root and use a navbar editor app and change it yourself.
Sent from my C6806_GPe using Tapatalk
athanaso77 said:
Has anyone tried to find a way to change the recent apps button to Menu button? I think that it is more convenient and the recent apps could pop up with long press of the button.
Click to expand...
Click to collapse
You need to be rooted.
1. Install Xposed Framework from here for Android 4.2 http://dl.xposed.info/latest.apk ,
Here for android 4.3/4.4 http://forum.xda-developers.com/showthread.php?p=48484642 ,
2. Inside Xposed, install and enable GravityBox,
3. Open GravityBox, under Navigation Bar Tweaks, enable Master Switch,
4. Click back and search Navigation Key Actions,
5. Under Recent Key, you can change Single Tap action to "Show Menu",
Long Press action to "Recent apps",
6. Reboot, Done!
Thanks for the reply.
I have already tried that but with kitkat version of gravitybox cause I am on GPe rom but it does not work. Have you tried that with jb version and it works for you?
athanaso77 said:
Thanks for the reply.
I have already tried that but with kitkat version of gravitybox cause I am on GPe rom but it does not work. Have you tried that with jb version and it works for you?
Click to expand...
Click to collapse
Install softkeyZ APP go to install directory in sdcard then collection select the icon you want change and rename it to MENU or any key you want then select the key from the app ...........ALL DONE..........
I am not sure I understood what you proposed to do.
Although I tried it but the only thing I managed to change is the icons only, not their function.
athanaso77 said:
Thanks for the reply.
I have already tried that but with kitkat version of gravitybox cause I am on GPe rom but it does not work. Have you tried that with jb version and it works for you?
Click to expand...
Click to collapse
I am on stock 4.3 and works perfectly. Not sure about GPe 4.4.
Other apps suchas softkeyz, UDN, GMD softkey, LMT launcher,... are all overlapping with keyboard when typing.
BTW, should press thanks button instead of saying it
GravityBox definitely works for remapping keys on a 4.3 rom ~ not sure about 4.4. I know xposed doesn't play nicely with ART, are you running dalvik or ART (if art that may be causing the issues).
Sent from my C6833 using Tapatalk
Yeap, my rom is ART compatible, so maybe this is the problem.
EDIT: Solution found in gravitybox forum... I had to enable master switch in Navigation bar tweaks!
Case closed!
athanaso77 said:
Yeap, my rom is ART compatible, so maybe this is the problem.
EDIT: Solution found in gravitybox forum... I had to enable master switch in Navigation bar tweaks!
Case closed!
Click to expand...
Click to collapse
Good. I edited my post about that.
Gravitybox can even exchange the place of Back and Menu key. I came from Samsung phone and I am used to the Back key at the right side
Johnnynho said:
Gravitybox can even exchange the place of Back and Menu key. I came from Samsung phone and I am used to the Back key at the right side
Click to expand...
Click to collapse
Yeap that's true, it doesn't even need to restart!

Adding Navbar (softkeys)?

On previous phones including the S5 you could just change the build.prop or use gravity box to add them but every time I try on reboot I get system UI crashing non stop until I undo my changes.
Has anyone gotten them somehow?
What about the side key panel?
Sent from my SM-N910C using XDA Free mobile app
That's in the way and inconvenient. They should have just added pie
Use Xposed and install GravityBox and use Navigation Bar Tweak feature
pcboyy said:
Use Xposed and install GravityBox and use Navigation Bar Tweak feature
Click to expand...
Click to collapse
It doesn't work. My post says that It doesn't.
zgroten said:
It doesn't work. My post says that It doesn't.
Click to expand...
Click to collapse
Had same issue. Use dynamic navbar on playstore or lmt pie. I went for dynamic navbar it's amazing and can be customised to your absolute liking.
I've installed dynamic Navbar but can't seem to figure out how to make it work like a regular Navbar and not sit on top of items on the screen.
I am using lmt pie...loving it
Sent from my SM-N910C using Tapatalk
Nobody can get regular softkeys without system UI crashing?
nope, seems like there's some piece of code missing, so that every time you activate those softkeys it just bootloops. have tried a number of methods, haven't found one that works. missing that soft home button (
eydryan said:
nope, seems like there's some piece of code missing, so that every time you activate those softkeys it just bootloops. have tried a number of methods, haven't found one that works. missing that soft home button (
Click to expand...
Click to collapse
This is a shame. I figured this would be one of the first mods due to the popularity and convenience of on-screen buttons. The bezel on the Note 4 is so small at the bottom that it wouldn't even look like a waste of space to have a navigation bar. The capacitive buttons are so easily pressed due to the small bezel. I don't mind this, but I wish the option for on-screen was included by samsung. I also hate the "back" button on the right side because I'm left-handed and can't reach it with my dominant hand. That should be reversible as well. Is that possible?
I also recommend lmt. The back button is instant.
whittikins said:
but I wish the option for on-screen was included by samsung. I also hate the "back" button on the right side because I'm left-handed and can't reach it with my dominant hand. That should be reversible as well. Is that possible?
Click to expand...
Click to collapse
If device is rooted then you can remap back and menu key by editing generic.kl
Sent from my SM-N910G using xda premium
dr.ketan said:
If device is rooted then you can remap back and menu key by editing generic.kl
Sent from my SM-N910G using xda premium
Click to expand...
Click to collapse
Did exactly that as soon as I got it. Although I actually prefer back key on right, just find note too wide to reach across, being left handed. Turned off the key light, not to cause confusion, and I guess it took a day to train muscle memory.
Sent from my SM-N910W8
dr.ketan said:
If device is rooted then you can remap back and menu key by editing generic.kl
Sent from my SM-N910G using xda premium
Click to expand...
Click to collapse
Ah, thanks! What would I change to simply disable the Recent and Back keys completely? I have on screen keys now. I still want to keep the home button because I don't accidentally press it.
Actually, I just put a # in front of the line for app_switcher, which worked. What do I change or remove to disable the capacitive Back hardware key? Thanks!
EDIT: figured it out!
To disable the Recent and Back hardware keys (capacitive buttons), edit /system/usr/keylayout/Generic.kl and put a # in front of these 2 lines:
key 158 BACK
key 254 APP_SWITCH
Save and reboot!
whittikins said:
Ah, thanks! What would I change to simply disable the Recent and Back keys completely? I have on screen keys now. I still want to keep the home button because I don't accidentally press it.
Actually, I just put a # in front of the line for app_switcher, which worked. What do I change or remove to disable the capacitive Back hardware key? Thanks!
EDIT: figured it out!
To disable the Recent and Back hardware keys (capacitive buttons), edit /system/usr/keylayout/Generic.kl and put a # in front of these 2 lines:
key 158 BACK
key 254 APP_SWITCH
Save and reboot!
Click to expand...
Click to collapse
That's very useful!:good:
marvi0 said:
Had same issue. Use dynamic navbar on playstore or lmt pie. I went for dynamic navbar it's amazing and can be customised to your absolute liking.
Click to expand...
Click to collapse
What is this lmt pie?
kopkiwi said:
What is this lmt pie?
Click to expand...
Click to collapse
It's an amazing app here in xda developed by a recognized member that adds pie control to your phone
drmodify said:
It's an amazing app here in xda developed by a recognized member that adds pie control to your phone
Click to expand...
Click to collapse
The only thing about let and pie control in general is that it auto dissappear. When multiple back key is required, it is a pain.
Which is why I have resorted to using side key panel when I don't want to use capacitive. I edited settings database to add transparency to side panel menu as well as having a hint bar dissappear. I moved it to the comfortable zone for my thumb, and trigger it without fail. It says on till I press outside of the side menu.
It is working great for me. Although I would rather have standard nav bar for purely visual reasons as well as more modding options.
Sent from my SM-N910W8
I too am a lover of a static nav bar on my Galaxy Devices.
I now have a SM-N910P now and am frustrated as heck at not being able to get it functional here, on a rooted stock NK2. I used to run SlimKat 4.4.2 on my SPH-L710 and loved the navbar that they baked into the ROM. SlimLoli is maturing for the Note 4, but it doesn't yet have any S-Pen support baked in. This fact, when coupled with how well Samsung and Sprint have done with TouchWiz on the Note 4 have caused me to hold off on putting a custom ROM on the device.
So, what to do.?. Editing buildprop does indeed cause the looping system UI FC. UDN is an excellent solution barring one issue, and that it is doesn't have a means to dedicate a portion of the display to the nav bar. It just overlays on top of the launcher's/app's UIs. I'd be willing to pay for a solution that fixes this.
Pie controls have never really clicked with me. Not yet being willing to move away from NK2, I find that I am wondering if there is a way to force a portion of the bottom of the screen to be entirely dedicated to a specific app, all of the time. As depicted in this screeny, UDN overlays and it is frustrating as hell.
Anyone have any ideas yet?
-t

Remap App Switch To Menu

So ive been search around for a while now on how to fix this. And to anyone that chimes in and says why do you need the menu button obviously you don't use older apps, the new touch button on the screen is a huge annoyance especially since i've used my phones this way since my first S1. Regardless this is how i want it and so do many other people.
Currently this is only for a rooted phone
I have figured out how to remap the left soft key from the App Switcher/Multi window over to the old style menu key. Instructions for that can be found here
But now i don't have any way of switching to my currently open apps, after remapping the left key, the longpress now takes you to search. and long pressing on the home button also takes you to another variation of the search (both i dont use nor want). I want to be able to remap my left softkey on longpress to open up currently open apps (APP_SWITCH) and it would be nice if long pressing on Home could open the Task Manager as it did on my S3.
As far as i can tell editing of the longpress function is done via a Policy edit. Read about that HERE
Keep in mind that post is from 2014 so i have no idea if the internal code is still being handled the same way, i couldn't even find that file on my S6, but i did find a file called SEPOLICY in my root folder using ROOT EXPLORER. Do any of you know more about this and how I can go about changing this? im sure its a code level adjustment. Thanks
Long-press home button can be controlled without root easily.
Check out this app:
https://play.google.com/store/apps/details?id=com.spada.nowgesturetweaksfree
I use the long-press home to get to my last used app.
I wonder if I can remap my buttons to launch any other apps.. Will have to tinker around a bit.
Ewww.
@rbiter said:
Ewww.
Click to expand...
Click to collapse
if you have nothing useful to bring to this discussion then please get out
j1635 said:
if you have nothing useful to bring to this discussion then please get out
Click to expand...
Click to collapse
very useful. menu for navigation is long long outdate. software nave or 3 dots is the customary way to go. adding a secondary menu button is redudant and unnecessary. my little ewww comment brought a lot to the table. you tryingt to call me out on it is less useful.
@rbiter said:
very useful. menu for navigation is long long outdate. software nave or 3 dots is the customary way to go. adding a secondary menu button is redudant and unnecessary. my little ewww comment brought a lot to the table. you tryingt to call me out on it is less useful.
Click to expand...
Click to collapse
lol f off
If you guys use Dropbox, how do you get to the menu with SORT, etc.. without a menu key. This is making me crazy. I'm using nova launcher and there is no floating menu key. ????
The problem is if not every developer uses it, it's inconsistent.
It often helps if the options etc. In apps are on the top, so you don't have to fidget with your phone to reach the top or use two hands.
The menu button on every app is positioned somewhere else, so I find the op wanting it justified.
All in one gestures let's you remap every key, for some odd reason on my s4 I can remap the menu key, but on the S6 for some odd reason the option of the menu key has vanished in the same app:what:
Sent from my SM-G925F using XDA Free mobile app
Hi pal. Hope it helps. Make 254 button remap, then install nova launcher, in tab gestures select long press menu and then recent app. Profit! Now once tapped you have menu button, long pressed - recent apps.
So, i made it, i use it. It works.
j1635 said:
So ive been search around for a while now on how to fix this. And to anyone that chimes in and says why do you need the menu button obviously you don't use older apps, the new touch button on the screen is a huge annoyance especially since i've used my phones this way since my first S1. Regardless this is how i want it and so do many other people.
Currently this is only for a rooted phone
I have figured out how to remap the left soft key from the App Switcher/Multi window over to the old style menu key. Instructions for that can be found here
But now i don't have any way of switching to my currently open apps, after remapping the left key, the longpress now takes you to search. and long pressing on the home button also takes you to another variation of the search (both i dont use nor want). I want to be able to remap my left softkey on longpress to open up currently open apps (APP_SWITCH) and it would be nice if long pressing on Home could open the Task Manager as it did on my S3.
As far as i can tell editing of the longpress function is done via a Policy edit. Read about that HERE
Keep in mind that post is from 2014 so i have no idea if the internal code is still being handled the same way, i couldn't even find that file on my S6, but i did find a file called SEPOLICY in my root folder using ROOT EXPLORER. Do any of you know more about this and how I can go about changing this? im sure its a code level adjustment. Thanks
Click to expand...
Click to collapse
but if i want to change the long press from split screen to menu? how do i find that? will it work the same?
Delphinus3 said:
but if i want to change the long press from split screen to menu? how do i find that? will it work the same?
Click to expand...
Click to collapse
look at my Rom.. it needs changes in framework to get that working..and it is working
Alex-V said:
look at my Rom.. it needs changes in framework to get that working..and it is working
Click to expand...
Click to collapse
i saw your page.. there are 2 roms i seem to like, yours and EMPORIA but idk who is best. lol i haven't even bought the phone yet but yea the menu button will be missed for me. what i want in a rom? if its based on stock i like it as close to stock as possible (no bloatware), call recording, if there's an option for increasing camera performance thats awesome, better battery life than stock original. that's it basically. and if i only want to root, how can i change menu longpress? i hered theres like a toolbox root app for galaxy devices...
Delphinus3 said:
i saw your page.. there are 2 roms i seem to like, yours and EMPORIA but idk who is best. lol i haven't even bought the phone yet but yea the menu button will be missed for me. what i want in a rom? if its based on stock i like it as close to stock as possible (no bloatware), call recording, if there's an option for increasing camera performance thats awesome, better battery life than stock original. that's it basically. and if i only want to root, how can i change menu longpress? i hered theres like a toolbox root app for galaxy devices...
Click to expand...
Click to collapse
it's only my personal rom..means it's not made for making any profit or let's say thousands of users..
i think you must try it yourself for one or two days and compare..my is very clean

Navkey

I've enabled the navkey, but the capacitive buttons are still working, i have tried editing the key layout settings but its still there.. Also tried gravity box but no luck.. Any help? Thanks
Use gravity box to disable backlight (under display section). Then use a file manager and editor with root access (I used ES File Explorer) and open the file synaptics_dsx.kl (it is located under system>user>keylayout) and then edit it by adding a # in front of the key entries. Save, reboot and your hardware keys should be off
kanagawaben said:
Use gravity box to disable backlight (under display section). Then use a file manager and editor with root access (I used ES File Explorer) and open the file synaptics_dsx.kl (it is located under system>user>keylayout) and then edit it by adding a # in front of the key entries. Save, reboot and your hardware keys should be off
Click to expand...
Click to collapse
Thanks mate, i have disabled the light though editing synaptics didnt work, but i figured it out by editing atmel_mxt_T100_touchscreen.kl,
Now, my problem is switching the back button and recent..
Why do you want to do that?
---------- Post added at 09:23 AM ---------- Previous post was at 09:19 AM ----------
I have enabled the soft keys via buildprop, disabled the hardware keys in the synaptic file, disabled the backlight and added double tap home key to sleep and long press home key for menu using gravity box. Looking good with the Pixel launcher, although unfortunately don't get the transparent white dock background.
Screenshot:
jlou0918 said:
I've enabled the navkey, but the capacitive buttons are still working, i have tried editing the key layout settings but its still there.. Also tried gravity box but no luck.. Any help? Thanks
Click to expand...
Click to collapse
hii can you tell me how u activated navigation bar i have tried several ways including cm13 and gravity box
how did you do it
thanks
[email protected] said:
hii can you tell me how u activated navigation bar i have tried several ways including cm13 and gravity box
how did you do it
thanks
Click to expand...
Click to collapse
You can do it manually if you have root, just need to change a value from 1 to 0 in the buildprop file (it's easy to find the relevant line as it has a description). However, I just use a free root app called Softkey Enabler from the Play Store. This makes it very quick to enable or disable the nav bar.
I leave the hardware keys on (because their long press functions are useful) but in accessibility settings I switch their layout around to match the nav bar. I use another root app called Keyboard Backlight Controller to disable their backlight.
kanagawaben said:
You can do it manually if you have root, just need to change a value from 1 to 0 in the buildprop file (it's easy to find the relevant line as it has a description). However, I just use a free root app called Softkey Enabler from the Play Store. This makes it very quick to enable or disable the nav bar.
I leave the hardware keys on (because their long press functions are useful) but in accessibility settings I switch their layout around to match the nav bar. I use another root app called Keyboard Backlight Controller to disable their backlight.
Click to expand...
Click to collapse
Which rom are u on?
I tried soft key enabler on official 16s and 19s it didn't work
I am on cm13 umbrella and it's really good
Far better fingerprint recognition
Better battery life I lost 3% over night
and finally i tried ur buildprop thing for soft keys it worked thanks for that BTW
Did u get to make the Navbar transparent by any chance
I have used the settings in cm13 to turnoff the backlit of capacitive buttons but there still functional can explain how u disable them or use them as u do for long press
Cheers for the help
[email protected] said:
Which rom are u on?
I tried soft key enabler on official 16s and 19s it didn't work
I am on cm13 umbrella and it's really good
Far better fingerprint recognition
Better battery life I lost 3% over night
and finally i tried ur buildprop thing for soft keys it worked thanks for that BTW
Did u get to make the Navbar transparent by any chance
I have used the settings in cm13 to turnoff the backlit of capacitive buttons but there still functional can explain how u disable them or use them as u do for long press
Cheers for the help
Click to expand...
Click to collapse
I am currently using 17S based Cuoco92. Fingerprint recognition has been just fine for me on Cuoco92, and on stock 16S, 17S and 19S - fast and accurate. The nav bar I have is transparent, just like in stock android. To disable the hard keys, go into system-usr-keylayout and edit the synaptics file (just add a # in front of the lines relating to the keys).
kanagawaben said:
I am currently using 17S based Cuoco92. Fingerprint recognition has been just fine for me on Cuoco92, and on stock 16S, 17S and 19S - fast and accurate. The nav bar I have is transparent, just like in stock android. To disable the hard keys, go into system-usr-keylayout and edit the synaptics file (just add a # in front of the lines relating to the keys).
Click to expand...
Click to collapse
Thanks for the info really appreciate it
I have found a small thing do u have any fix for it?
The notification panel doesn't fully open due to the nav keys
Some other elements get blocked as well
Any solution?
[email protected] said:
Thanks for the info really appreciate it
I have found a small thing do u have any fix for it?
The notification panel doesn't fully open due to the nav keys
Some other elements get blocked as well
Any solution?
Click to expand...
Click to collapse
No, don't think there's anything you can do about that I'm afraid. I have actually gone back to just using the hard keys as they come. The soft nav keys are nice, but bit of a waste of screen space when you have perfectly good hard keys there to use.
kanagawaben said:
No, don't think there's anything you can do about that I'm afraid. I have actually gone back to just using the hard keys as they come. The soft nav keys are nice, but bit of a waste of screen space when you have perfectly good hard keys there to use.
Click to expand...
Click to collapse
Yea your right about that but the screen is big so having on screen buttons help in using the phone with one hand
I am surprised how the hardware buttons completely disappears when not back lit better then even OnePlus one
I have put a request in the feedback app for a feature like OnePlus one for choice between on screen and off screen
[email protected] said:
Yea your right about that but the screen is big so having on screen buttons help in using the phone with one hand
I am surprised how the hardware buttons completely disappears when not back lit better then even OnePlus one
I have put a request in the feedback app for a feature like OnePlus one for choice between on screen and off screen
Click to expand...
Click to collapse
I would love them to add that feature. It was one of the best things about CM13 on my Zenfone 2.
Currently I am using the stock eui launcher (it's so smooth and light, and I don't really need an app drawer because I don't download so many apps) and the soft keys don't go so well with that launcher, but I also have the Pixel launcher installed, and I really like using the soft keys with that.

Categories

Resources