[GUIDE] Change logo2menu to logo2recents - One (M7) General

I don't recall seeing any roms having logo2recents by default, and my current setup did not allow for it either. (I use Android Revolution + Elemental), so I decided to look for a solution.
What you do is this:
-You must have a kernel that enables logo2menu, it'll enable the logo as a button (duh )
-Navigate to /system/usr/keylayout
-Backup the synaptics-rmi-touchscreen.kl file
-Open with the text editor
-Change this line:
key 139 MENU VIRTUAL
To:
key 139 APP_SWITCH WAKE_DROPPED
Save, exit, restart.
Your logo will now load up the recents window.
To me this is much more useful than menu, since most apps have integrated the menu button into their menu bars, so I'd be wasting the use of one capacitive button. I tend to switch between apps much more often, so the quick recents window access is totally worth it.
Side benefit (an odd one that didn't exist before I changed that file). When you go into settings/display&gestures&buttons, there will be a new setting under "buttons." It'll allow you to set tap or long press for recents/menu. Weird how it didn't exist before editing the .kl file above.
Thanks to danny 92 and wednesday13 for pointers from another thread.
*Note, just figured this out. When using this method it breaks the lockscreen shortcuts. No idea how to fix that part, sorry.

great.
this is what Im looking for long time

xposed module "MenuBeGone" could also do the same

I tried changing it to:
key 102 APP_SWITCH WAKE_DROPPED
key 158 BACK
key 139 HOME
So that the setup would be similar to onscreen keys in stock android ie left button: back ; middle button: home ; right button: recent apps.
Now my home button doesn't work even after changing settings to:
key 102 HOME
key 158 BACK
key 139 APP_SWITCH WAKE_DROPPED
Also tried changing settings to:
key 102 HOME
key 158 BACK
key 139 MENU VIRTUAL
and still my home button doesn't do anything.
Had to do a restore from TWRP
I'm running android 5.1 GPE with ElementalX kernal.
Any idea how to make this work, or why the home button doesn't work even after reverting the file?
After restoring I tried just changing the Key 139 line to APP_SWITCH WAKE_DROPPED and leaving everything else as is, and it works as intended. Guess I'll just have to get used to home and recent apps being in the wrong position (and then get used to them being in the right position when I get me new phone)

Related

[Q] Remap Hardware Buttons

Is there any way to remap the hardware buttons on the DHD? I use nolock and it works great but my volume buttons wake up my phone and sometimes when I have it in the case on my belt, the volume button gets pressed and some strange things can happen when it's not locked. I would like to remap the volume buttons so that they don't wake the phone up.
That would be no problem at all. That is, if you have full root (S-Off) so that you can write to your system partition.
If so, just edit the file: /system/usr/keylayout/spade-keypad-v0.kl
The original file has the following keymap definitions:
Code:
key 102 HOME WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
I've swapped the Home and the Search button because I've rather small hands
(I will write a app to redefine these buttons in the future)
I think your problem will be solved by deleting WAKE behind the volume buttons
Thanks, I'll give it a shot.
This is one thing I hate about the different manufactures; different button order.
Sent from my Desire HD
I wrote a tool to edit the keylayout map file simple and easy. Posted it here:
http://forum.xda-developers.com/showthread.php?t=850464
(it says experimental, because it is intented as an app for all Android devices. However, it is tested on the DHD and it works without any problems)
With the app you can turn off the waking up of the device, but you can also assign functions to your keys like call/endcall, media next .. you can swap the home and search button or remap the volume keys to page down/up for ereading (with a hot reboot which will be implemented later, effectuating key redefinitions can be done fast, so that it is also possible to do a temporarily remapping)

[Q] is it possible to change key functions?

I was wondering if there is a way to change key functions on note 3, for example: by pressing menu key we can see recent apps instead of menu
I would be thankful if anyone can suggest a solution to do this:good::laugh:
arash2901 said:
I was wondering if there is a way to change key functions on note 3, for example: by pressing menu key we can see recent apps instead of menu
I would be thankful if anyone can suggest a solution to do this:good::laugh:
Click to expand...
Click to collapse
There are actually a couple different ways to do it...
You can used Xposed mod, with either Xposed Additions or MenuBeGone
(I've never used either of these methods...)
or, the way that I do it, manually edit the \system\usr\keylayout\Generic.kl file.
When I do it, I make the following two changes:
Change key 139 from MENU to BACK
Change key 158 from BACK to APP_SWITCH
Then I use button savior to add the menu for those things that need it...
(I'm coming from Nexus devices, so having the keys with back on the left, and app switch on the right is how I'm used to it...)
Ever wondered to use Google search ? Just saying.
Sent from my N9005
carnagecjb said:
There are actually a couple different ways to do it...
You can used Xposed mod, with either Xposed Additions or MenuBeGone
(I've never used either of these methods...)
or, the way that I do it, manually edit the \system\usr\keylayout\Generic.kl file.
When I do it, I make the following two changes:
Change key 139 from MENU to BACK
Change key 158 from BACK to APP_SWITCH
Then I use button savior to add the menu for those things that need it...
(I'm coming from Nexus devices, so having the keys with back on the left, and app switch on the right is how I'm used to it...)
Click to expand...
Click to collapse
thanks
that's helpful (kind of!)
I was able to change function of key like starting camera by pressing menu key, but still don't know how to put recent app instead of menu?
--------------------------------------------
[problem solved,found it]
thanks a million man
big help
arash2901 said:
thanks
that's helpful (kind of!)
I was able to change function of key like starting camera by pressing menu key, but still don't know how to put recent app instead of menu?
Click to expand...
Click to collapse
Quick and easy answer:
Change key 139 from MENU to APP_SWITCH

Remap buttons on remote?

Hi, guys
Is there any way that I can remap buttons on the remote? For example, long press play/pause for menu(some legacy apps still require menu key to function), long press up/down for volume up/down.
2ig2ag said:
Hi, guys
Is there any way that I can remap buttons on the remote? For example, long press play/pause for menu(some legacy apps still require menu key to function), long press up/down for volume up/down.
Click to expand...
Click to collapse
I dont have it yet so i have no way of testing it out, but i recently remapped the physical keys on my nexus 6 by editing /system/usr/keylayout/generic.kl
I know this file is used to map physical and virtual keys in almost all android devices. not sure if it works for the remote or not but id start there. you need to be rooted to to access the file though. Let me know of it works or if you need anymore help feel free to pm me.
I am also hoping there is an answer to this, as I would like to access the context menu by long pressing a button like the way it was done in the apple TV 2. Unless I'm missing something, I can only access this menu by going into Yatse app on my phone.
PS. I'm referring to when I am in Kodi for the context menu
globber said:
I am also hoping there is an answer to this, as I would like to access the context menu by long pressing a button like the way it was done in the apple TV 2. Unless I'm missing something, I can only access this menu by going into Yatse app on my phone.
PS. I'm referring to when I am in Kodi for the context menu
Click to expand...
Click to collapse
You can edit the keymap.XML file in kodi to open the context menu when you press the play/pause button when a video is not playing. If a video is playing it will act as the normal play/pause button.
Sent from my LG-D851 using Tapatalk
My solution was to use the Amazon Fire TV stick remote. That remote is solid. The only thing that the stick remote can't do is voice search.
jaygz said:
You can edit the keymap.XML file in kodi to open the context menu when you press the play/pause button when a video is not playing. If a video is playing it will act as the normal play/pause button.
Sent from my LG-D851 using Tapatalk
Click to expand...
Click to collapse
Can you show me how to do that? Because When I use the keymap tool in kodi, the only keys that get registered are the arrow keys. when i press the playpause key it doesnt give me a button id. Thank you !
aftv stick remote keymap HELP
Hello everyone, I need some help for keymapping my aftv stick remote to be use on my nexus player. For default it works nice but I read some post that the center button may be act different and some apps dont works and thats my case. It works on kodi but in Playon app I can move through the menu but I can't enter to the menu when I press the center button. Any help or advive? Thanks!
The post at http://forum.xda-developers.com/showpost.php?p=59821276&postcount=111 explains how to remap the remote's play/pause button to bring up the context menu in Kodi. I've tried it and can confirm that it works.
Copy this to /system/usr/keylayout and Correct permissions
Remaps Search button to Menu
https://drive.google.com/file/d/0B378QJZzCsnqM0FyLTZaaVpZdVk/view?usp=sharing
boldfilter said:
Copy this to /system/usr/keylayout and Correct permissions
Remaps Search button to Menu
https://drive.google.com/file/d/0B378QJZzCsnqM0FyLTZaaVpZdVk/view?usp=sharing
Click to expand...
Click to collapse
interesting ...
key 103 DPAD_UP
key 105 DPAD_LEFT
key 106 DPAD_RIGHT
key 108 DPAD_DOWN
key 158 BACK
key 164 MEDIA_PLAY_PAUSE
key 172 HOME
key 217 SEARCH
key 353 DPAD_CENTER
So remapping row "key 217 SEARCH" to "key 217 MENU" will let voice search button act as menu button?
is there a way to add long click behavior? for example to keep voice search as default function and long click for menu??
thanks!
furius said:
interesting ...
key 103 DPAD_UP
key 105 DPAD_LEFT
key 106 DPAD_RIGHT
key 108 DPAD_DOWN
key 158 BACK
key 164 MEDIA_PLAY_PAUSE
key 172 HOME
key 217 SEARCH
key 353 DPAD_CENTER
So remapping row "key 217 SEARCH" to "key 217 MENU" will let voice search button act as menu button?
is there a way to add long click behavior? for example to keep voice search as default function and long click for menu??
thanks!
Click to expand...
Click to collapse
Long click behavior is more complicated, so no.
Check here
http://forum.xda-developers.com/showthread.php?t=695936
I have a similar problem. I have this remote but the back key up on the top is mapped as a mouse press. I previously used this remote on a minix box with no issues running 4.2.2, however the nexus registers it as left click i believe. is there any way to change this? Thanks!
Search trigger button
Guys,
when i use a keyboard and i search i cant hit enter to trigger the search i always need press search on the onscreen keyboard. Is there any way to trigger search by key "Enter" or so? I deactivated the onscreen keyboard because i dont need it with a physical keyboard, but now i cant search... Anybody got a solution?

Note 4 swapping menu and back buttons in the keyboard layout

This is for Samsung Note 4 N910G models, most likely applies to other N910 models also..
Some left handed people like to swap over the buttons, in my case a faulty button forced me to swap them over so i had a usable back button.. so i got searching for ways to swap them over!
After a little while googling around, I found a lot of forum posts which advise to swap over the MENU and BACK key mappings in the generic.kl file as per below
Key 139 MENU
key 158 BACK
change to
key 139 BACK
Key 158 MENU
Note 4 is a little different, its menu button is now the "APP_SWITCH" button which switches between apps, where-as most galaxy models are a double tap of the home button to switch apps.. i accidentally broke my back button when swapping over an LCD screen, as a temporary measure while i wait for my new buttons (whole usb charging section contains the back and menu buttons) to arrive, i opted to swap over the buttons (i know you can have an on-screen back button but prefer the soft key as on-screen gets in the way)
1. Using ES Explorer on a rooted note 4, browse to \system\usr\keylayout
2. Open up Generic.kl in ES note editor
3. Go into Edit mode
4. Swap over the generic keys anyway (not sure what affect this has as my right-side soft key is broken)
key 139 BACK
Key 158 MENU
5. Find the following key under #samsung comment further in the file;
key 254 APP_SWITCH
change this to:
key 254 BACK
6. save the file, reboot your phone and voila! menu button is now the back button. :good:
hope this helps someone as this caused me a little confusion due to the number of forums which explicitly state that the soft keys are key 139 and 158...

[TIP] How to disable hardware key and enable soft key in mi5s

[TIP] How to disable hardware key and enable soft key in mi5s/mi5s plus
Mi5S and Mi5S plus has hardware key
When you play a game horizontally, the game might turn off by mistake.
You need to deactivate the hardware button to prevent this.
A necessary thing
- a rooted phone
- root explorer (you need to modify system file)
1. Go to /system/build.prop and add qemu.hw.mainkeys=0
2. Go to /system/usr/synaptics_dsx.kl and add # on last lines like
[before]
key 139 MENU VIRTUAL
key 102 HOME VIRTUAL
key 158 BACK VITRUAL
key 143 WAKEUP
[after]
#key 139 MENU VIRTUAL
#key 102 HOME VIRTUAL
#key 158 BACK VITRUAL
key 143 WAKEUP
You can make #key 143 WAKEUP and home button can be completely disabled.
(Only the power button can light the screen. not home button)
(mi5s plus doesn't has key 143 WAKEUP because mi5s plus doesn't have home button to light the screen)
3. Reboot!
You can revert these steps to enable hardware key again
and you can find hardware key light settings at Settings - Additioal Settings - Button
jpg3927 said:
[TIP] How to disable hardware key and enable soft key in mi5s/mi5s plus
Mi5S and Mi5S plus has hardware key
When you play a game horizontally, the game might turn off by mistake.
You need to deactivate the hardware button to prevent this.
A necessary thing
- a rooted phone
- root explorer (you need to modify system file)
1. Go to /system/build.prop and add qemu.hw.mainkeys=0
2. Go to /system/usr/synaptics_dsx.kl and add # on last lines like
[before]
key 139 MENU VIRTUAL
key 102 HOME VIRTUAL
key 158 BACK VITRUAL
key 143 WAKEUP
[after]
#key 139 MENU VIRTUAL
#key 102 HOME VIRTUAL
#key 158 BACK VITRUAL
key 143 WAKEUP
You can make #key 143 WAKEUP and home button can be completely disabled.
(Only the power button can light the screen. not home button)
(mi5s plus doesn't has key 143 WAKEUP because mi5s plus doesn't have home button to light the screen)
3. Reboot!
You can revert these steps to enable hardware key again
and you can find hardware key light settings at Settings - Additioal Settings - Button
Click to expand...
Click to collapse
Thank you for this. Any news from miui when they release the source? I miss Cyanogenmod
v0ne said:
Thank you for this. Any news from miui when they release the source? I miss Cyanogenmod
Click to expand...
Click to collapse
i need cyanogenmod too.. i think can get some custom rom at least 2017
thank you man.thanks alot :*
You can also do this with Magisk. I will try to upload a module.
Try this module. It works on my Mi 5S running xiaomi.eu 9.5.2.0 ROM.
What this module does is it replaces the file /system/usr/synaptics_dsx.kl, commenting out this line:
Code:
key 143 WAKEUP
wpyh said:
Try this module. It works on my Mi 5S running xiaomi.eu 9.5.2.0 ROM.
What this module does is it replaces the file /system/usr/synaptics_dsx.kl, commenting out this line:
Click to expand...
Click to collapse
This only disables waking up the screen with the home button?
Chaninoza said:
This only disables waking up the screen with the home button?
Click to expand...
Click to collapse
Yes. Should I also make modules for other functions? Like disabling all the buttons like the OP said?
wpyh said:
Yes. Should I also make modules for other functions? Like disabling all the buttons like the OP said?
Click to expand...
Click to collapse
If u want to, im just interested in the one u posted
Chaninoza said:
If u want to, im just interested in the one u posted
Click to expand...
Click to collapse
Well, someday I might submit this to the Magisk repo. Actually I don't think we need to switch the Menu and Back buttons, because they can be switched via the Settings app -> System & Device / Additional Settings -> Button and gesture shortcuts -> Button Positions / Navigation buttons, at least on Xiaomi.eu ROM it's available. I think it's also available on the original ROMs (China and Global) as well.
These modules actually implement the original post.
wpyh how I can install it on phone?

Categories

Resources