Hey, if youre running a custom ROM, and want to use the on-screen buttons, having your capacitive buttons still functioning the same can be pretty redundant, so I came up with a way to remap them to open any app that you choose. All that is required is Tasker and root access.
First off, what you need: Tasker, Root, and a text-editing program
Get your keylayout file. There are multiple ways to do this, but since all phones use different names for them, its best to just open up an app like Root Explorer and move to the file itself, and then copy and paste it. The files name is synaptics-rmi-touchscreen.kl, so if youd prefer to adb pull it, its located inside the /system/usr/keylayout folder.
Edit your button IDs. After getting your .kl file, open it with a regular text editor, and find the keys that you want to change. For mine, I used the home and back keys. Locate where they are; it wont be hard as the keys have their actions next to them, and change one key to CAMERA, and the other the SEARCH.
Map button actions in Tasker. Finally, open Tasker (turn off Beginners view in settings), and hit New > Event > Hardware > and then your button of choice. You can either select the Camera button first, or the Search button. Inside the Event screen, set the priority to Highest, and if youre editing the Camera button, check the Stop Event button. Create a new task in the profile for your button, and create a new action. After, click App > Load app, and then select which application you would like to launch on that button. Do the same thing for the Search button, but you have to long press the search button to access it, as regularly clicking it will open Google Now.
Hope this helps anyone with hardware keys that wanted to switch over to the nav buttons.
Related
What is the Jog Button program?
It seems to have installed itself on one of my hardware buttons and ocassionally scrolls through several functions when that button is pressed.
I know how to change the button assignment but am wondering if there is something about Jog Button that we will want to use?
JogButton was just a freeware app we liked which allows multiple functions to be controlled by a single button. Feel free to re-assign the apps using JogButton's 'Tools' menu, or to use the button for something else entirely.
X
Thanks for the quick reply.
Do you know where I can find a help file for instructions for Jog Button?
I couldn't find it within the device and in playing with the program it just doesn't come to me.
JogButton Instructions
Fairly simple once you get the hang of it...
1. Press-and-hold the contacts button to activate JogButton. This causes the programs in its list to scroll/cycle
2. Release the contacts button when the icon of a program that you want to activate appears
Setup
1. Press-and-hold the contacts button
2. Click on the tools menu at bottom of screen
3. Select setup from the tools menu
4. The dialog that shows lists the programs and order of cycle.
5. Add/Delete/Edit as desired
6. The Snd check box is a toggle for sound/no-sound (a beep as each program is shown)
7. Duration is the number of milliseconds that an icon is shown
Hopefully that answers you questions
I'm the author...
Tek
Thanks for the reply. You are a genius!
This seems like a very handy app.
Joe_PDA
other buttons
What about using this very simple app on the calender button.
Have your "serious" stuff on one side,
then "toys" on the other..
I presume you have future plans, so give us a clue please
Perhaps even ask for ideas...
Martin
JogButton - Future Plans...
I started coding an alt-tab like feature into JogButton, but was not sure if that would be useful for anyone other than me. As you may know alt-tab in the Windows world scrolls you through the open list of of apps in a Last-in-first-out/Most Recently Used fashion. This would be useful for switching between two apps, the downside would be that you would have to remember the order. I was thinking of putting a toggle on either the menu or in the setup dialog to select this mode.
As for using two buttons, it is possible,but the way PocketPC handles the programs assigned to a button they have to have different names. I would of course have to make a few minor adjustments to allow for this, but it is possible.
I'm up for any suggestions to make this program more useful. Start a list and let's see what we get.
8)
Re: JogButton - Future Plans...
tekknogenius said:
I'm up for any suggestions to make this program more useful. Start a list and let's see what we get.
Click to expand...
Click to collapse
Bug: by timing a quick press just right, I can get it in a mode where it keeps cycling through the programs even though I've released the button already.
I think I was unable to map it to both the hardware buttons using a different list of programs to cycle through for each button. Since a single short press still does the same thing, there's really no reason not to map it to the second button also. (?? Quick hack: map second button to patched Jogbutton2.exe, using different set of registry keys. Better: multiple small stubs which start the real exe telling it which stub was executed. ??)
Maybe map a special action to pressing both buttons at the same time?
Also, something like 'double-press' and 'triple-press' found in some other programs to quickly go to the second and third item (or completely different items) without looking at the phone would be handy. I never really use the rocker-switch, but it could be handy for app starting: just keep the hardware button pressed and hit one of the four directions or the center, giving you 5 new things (per hardware button) to start.
JogButton...
Good suggestions. I can enhance it to use all available buttons. I prefer to use one hand, but others might like to have more options available.
hmm, must be a n00b suggestion, but perhaps it would be possible to use the volume control button? i dont use it for anything anyway.
Only two options... that I know of...
On the XDA/MDA PPCPE there are only two mappable buttons, unlike other PPC that have four or five. It's either the contacts button or the calendar button. Now once an app is mapped to either button and the app is launched, it can control any of the buttons. As a side note, the volume button would be great if it were dual functioning: a press-and-release brings up the volume dialog; a press-and-hold would bring up the record function.
Does anyone know where i can find a cab that allows u to remap hardware buttons? i remember stumbling on such cab a while back but cant find it anymore. i tried doing a search and had no luck finding.
Not sure about power key
http://www.orthancsoftware.com/DoubleLaunch.htm
I used this to change the functions of the CommManager hardware button (below the power button). It now can run Zapit (to close open program without touching screen), go to silence (vibrate mode) with a press using VibraSwitch and after making a copy of CommManager.lnk from the Windows root folder to Windows/Start Menu/Programs folder I am also able to use the button (with a long press) to open the CommManager as usual. Seems to be the best of all worlds.
Keep in mind that this is shareware. It works with one key without registration. Buy the program if you need more keys mapped with multiple presses and functions.
In start->settings->personal there is an option for button assignment. I want to change a long press hard key ( any of them) to bring up the keyboard.
I tried several but couldn't find it. Do you know which one it is?
I'd like to make back button as X to close applications or programs
is there any chance for that???
The only button that can be modified is the call button. The only functionality that can be added is allowing it to execute an executable by holding down the call button.
What you do is you create a shortcut called "long_send.lnk" and put it into the \windows\ directory. Whatever the shortcut is directed towards, a long-press of the send key will trigger that programs.
Many users have made simple executables that rotate the screen, generate an alt-tab-like screen, or other task managers. By allowing long_send.lnk to those programs, in effect that button can be used to rotate the screen, etc (which is what I've done).
Someone is programming program to translate multi-touch gesture into running shortcuts. That will hopefully in effect replace our lack of hardware buttons, so we can trigger behaviors on our phones by gesturing rather than pressing buttons.
ikomu said:
I'd like to make back button as X to close applications or programs
is there any chance for that???
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=583638
Tweak: 7
Thanks for the help. I know it may sound silly but I need this for Pandora, I'm not happy with other music solutions. Since Pandora and evil providers do not want pandora on HD2, I am forced to use an old pandora cab which is designed for a hard keyboard.
felixdd said:
The only button that can be modified is the call button. The only functionality that can be added is allowing it to execute an executable by holding down the call button.
What you do is you create a shortcut called "long_send.lnk" and put it into the \windows\ directory. Whatever the shortcut is directed towards, a long-press of the send key will trigger that programs.
Click to expand...
Click to collapse
You shouldn't use this method. The link is also triggered by pressing the call button when you want to answer a call (not a long hold - just a press). It doesn't answer the call either - just does the long_send shortcut.
While transitioning some old Apps (FuelLog Pro) from my other Android phones onto my S6 Edge, I discovered that some of the apps needed to use a 'menu' key to backup/export. Obviously no way to add a menu softkey without root, SO I figured out how to do it from ADB.
Once you connect your phone to ADB enter the following command for the 'menu' softkey:
Code:
adb shell input keyevent 82
The 'keyevent' relates to various keymappings, annoyingly, the keymappings for the Samsung are a little different from standard Android, which is why I'm making a record of it here.
So far it looks like HOME, BACK, CALL, and Volume follow standard keymappings. I'll update this list if I spend more time digging and find other differences.
You can find the complete list here:
http://developer.android.com/reference/android/view/KeyEvent.html
This is super useful for running batch commands on Apps from the computer as well.
Use wisely.
Thanks, can we replace the long press on the recent apps button from dual windows to menu key?
I really don't understand where the problem is with just pressing the menu overlay button?
For old Apps without the new Material UI I always get a round overlay button which is acting as a Menu button.
The new one don't have these as they integrate this button themself.
I have not found any app yet where I'm not able to open the menu.
There is no way (as far as I know) but also no need to replace the long press with the menu button.
Menu button is not needed anymore.
I have several apps that don't have the round overlay Menu button (including the aforementioned app, FuellogPro). Mostly it is apps that were written about 2 years ago that got stuck between KitKat and JB. I have quite a few paid apps, so I keep using them (and modifying them) even after support has ended.
You can only reassign the button to 'menu' if you have root.
Google has already told everyone to stop using hardware menu buttons and to instead use the built-in software ones in the apps.
Unfortunately there's quite a few devices, the Galaxy Note 10.1 2014 included, that still have a menu button.
My goal is to successfully remap that button to a Recents button, and enable the built-in software ones. I'm using Hyperdrive RLS5.1 on my device, but this technique should work with any other ROM too - if it doesn't, there is either a conflict or you might need to change other keylayout files as well.
I fairly easily remapped the key.
You just use a root file explorer like FX to go to "/system/usr/keylayout/Generic.kl" and find the line that looks like "key 139 MENU" and change it to "key 139 APP_SWITCH". Then reboot the device. When you press the button, it will open the task switcher - but there's a nasty caveat. When you do this, the device still has the menu key in it. So if you go into an app like Firefox or Viper4AndroidFX and try and change settings, you can't. The menu button is inaccessible.
But, no fear: the solution is the Xposed Framework, combined with MenuBeGone, which can be found at http://repo.xposed.info/module/ro.epb.menubegone. I've checked the source code and it's completely benign - the key here is that you have to force every app to return "false" when it checks if the device "hasPermanentMenuKey".
It doesn't matter how much remapping you do, the device still technically has a physical menu key. Lil' blighter.