? remap green button to speakerphone - Tilt, TyTN II, MDA Vario III Windows Mobile ROM De

I want to map the green "phone" ("send") button to work as speakerphone with long keypress when phone is used, but I can't find any info.
OTOH I notice most ROMs use long press for this button and map usually wireless managers, which would be fine if it would work that way only when phone is not in use (and 'restore' the speakerphone function for long press when phone is in use) but I have not seen such solution yet. Has anyone done/try this?

-888- said:
I want to map the green "phone" ("send") button to work as speakerphone with long keypress when phone is used, but I can't find any info.
OTOH I notice most ROMs use long press for this button and map usually wireless managers, which would be fine if it would work that way only when phone is not in use (and 'restore' the speakerphone function for long press when phone is in use) but I have not seen such solution yet. Has anyone done/try this?
Click to expand...
Click to collapse
Hi,
Deleting Long_Send.lnk might restore original function of long press send key sir,.
Hope it help,.
Regards

Unfortunately, I don't think you can have two different functions based on context. AdvancedConfig has an option to map pretty much anything to the long send.

Garmin said:
Hi,
Deleting Long_Send.lnk might restore original function of long press send key sir,.
Hope it help,.
Regards
Click to expand...
Click to collapse
Thank you, Sir
blue_94_trooper said:
Unfortunately, I don't think you can have two different functions based on context. AdvancedConfig has an option to map pretty much anything to the long send.
Click to expand...
Click to collapse
Well, I was thinking about something more complex than I can do myself, hence my post here.
Idea is to make a small applet which will switch the function of the button based on the processes running (or other ways to determine it) and assigning different shortcut to this button. I.e. when the phone is connected it will assign speakerphone to the "send - long press", when phone is not in use it would redirect "send - long press" to the wireless manager, if you know what I mean (sorry my english); so virtually mapping the "green" button to this app could achieve that, no?

intersted also in your send key LKP!!
-888- said:
Thank you, Sir
Well, I was thinking about something more complex than I can do myself, hence my post here.
Idea is to make a small applet which will switch the function of the button based on the processes running (or other ways to determine it) and assigning different shortcut to this button. I.e. when the phone is connected it will assign speakerphone to the "send - long press", when phone is not in use it would redirect "send - long press" to the wireless manager, if you know what I mean (sorry my english); so virtually mapping the "green" button to this app could achieve that, no?
Click to expand...
Click to collapse
Bump....
I also want exactly the same setup! Great minds think alike!
Your mention about the wireless manager sounds a handy idea also, and I am at present having to use a long keypress on the left hand hardware 'record' button. This is fine, but I also have it mapped to normal press = audio record. But want to use it for something else at some point.The more buttons free the better. To be able to have the sent button act on a long key press to work the speakerphone seems to me like something that should actually be in place by default. I mean, what better way to start the speakerphone!!
I do hope someone is able to shed some light on this, or you manage to pull it off yourself you can count me in to try the fix etc.
PS:: Would a MORT SCRIPT help in this situation I wonder? I am not familiar with MS but sure someone may know a way round it.
Regards
Nick-UK

Thanks for your kind support
I wrote about this year or more ago on another forum, but few responses I got were discouraging at best.
I think if we could do such "app", we could use it for all the buttons and change their "assignments" based on the currently running apps...
With scripts we can do things like rename "Long_Send.lnk" into "Long_Send.disabled" (for example) instantly, and rename it back to "Long_Send.lnk" when i.e. pressed again. But the problem is that I don't know how to "detect" and use it in the scripts what is currently running and discriminate between foreground and background processes that are currently running?
Because what if you have two (or more!) programs that are using the same button assignments but for different purposes and both are running in the same time? say you are on the phone talking - thus long_send is assigned to speakerphone, and you also run (for example) windows media player where you assigned same green button to fullscreen display? The scripts cannot tell which one is running in the foreground by themselves, and (in this example) holding green button could bring the WMP to fullscreen instead of turning on speakerphone. Beforewe use mortscript to "activate" apropiate script, we need to know which process was started last (so - per my example - we would know that the phone was last started and not the WMP, and mortscript would run "speakerphone script for green button" instead of "fullscreen wmp script for green button"... and there is another problem: the phone is always ON on our PocketPCs since boot, and it is running all the time in the background, so it will have to differentiate between phone being active and phone in the "waiting" state...). Apologies if I sound incomprejensible, I tried to make it clearer but I don't know is it less gibberish
to cut it short: I don't think it can be done with simple scripts. But of course I may be wrong.
In theory it should work this way:
1 Long_Send.lnk -> starts our "app"
2 "App" checks what program is currently running on the screen (in the forground, or last started etc)
3 "App" executes apropiate action assigned for this program (i.e. speakerphone for active phone call, or wireless manager for today screen, etc etc)
4 "App" releases/removes/disables the action from previous step and changes it back to the state it was before when the foreground program is closed (i.e. changes back long_send from assignment to speakerphone back to default once the phone call ended)
sounds simple, doesn't it?

Related

How do I make a button 'Voice Record' properly?

In the cooked ROM I was running on my 8525 the PTT button was set so press and hold ran the notes app in recorder mode and recorded until I released the button.
It seems to be a fairly common feature that about every *other* smartphone I buy has... And all the older ones and PDAs had it on their dedicated record buttons.
I just got a Tilt and did the regedit so I can assign the PTT button, but how do I make a press and hold start recording and do it until released? I can't figure out what link (or otherwise) was being called on my 8525... The closest I came was finding a Record.lnk in Windows\AppButtons but that's not it, because the link is bad on both my 8525 and the Tilt...
Strangely the Tilt comes with a new HTC app called voice recorder, but I don't see any real point in it or way to make it record like I want.
Nothin'? I know people have figured it out because it was added back to the Black Majik WM6 Rom I used on my 8525...
Made it so easy to record a quick not about where I parked or something to check on at word...
Try using a third party program like ae button plus or a freeware program there are many out there
TheCritic said:
In the cooked ROM I was running on my 8525 the PTT button was set so press and hold ran the notes app in recorder mode and recorded until I released the button.
It seems to be a fairly common feature that about every *other* smartphone I buy has... And all the older ones and PDAs had it on their dedicated record buttons.
I just got a Tilt and did the regedit so I can assign the PTT button, but how do I make a press and hold start recording and do it until released? I can't figure out what link (or otherwise) was being called on my 8525... The closest I came was finding a Record.lnk in Windows\AppButtons but that's not it, because the link is bad on both my 8525 and the Tilt...
Strangely the Tilt comes with a new HTC app called voice recorder, but I don't see any real point in it or way to make it record like I want.
Click to expand...
Click to collapse
You might want to follow my articles (even past ones); in the Sound Recorrding Bible, I explained it's Notes that you must look for. In Settings / Buttons, it's denoted as "Record". Just assign it to any hardware button and you're set.
scousemartin said:
Try using a third party program like ae button plus or a freeware program there are many out there
Click to expand...
Click to collapse
Not needed - the basic OS supports this. Albeit, speaking of the button enhancers you've mentioned, you will want to read my latest Button Enhancer Bible.
Record isn't listed in the list of available programs to launch on a Press and Hold for button 6.
I can see it on my XV6700 assigned, but on the Tilt it isn't in the list ...
Proto732 said:
Record isn't listed in the list of available programs to launch on a Press and Hold for button 6.
I can see it on my XV6700 assigned, but on the Tilt it isn't in the list ...
Click to expand...
Click to collapse
Now I understand what you mean. I've upped Record.lnk for you to http://www.winmobiletech.com/sekalaiset/Record.lnk . Just put it in AppButtons and, if it can't be seen from Settings / Buttons, \Windows\Start Menu\Programs
Thanks for the assist.
I did have a Record.lnk in the AppsButtons folder, but the shortcut indicated it was pointed at a program called: HotVoice.
I copied your link to both locations and was then able to assign Record to Press & Hold for Button 6.
Thanks again.
Glad it worked
The strange thing is, the broken Record.lnk in Windows\AppButtons, is ALSO broken on my 8525 but the functionality still works there somehow...
Thanks for your help! It didn't work at first for me, especially just clicking on the link... but once it showed up in the recent items in the start menu it showed up in settings|buttons and I was able to assign it to button 6 (press and hold). WORKS LIKE A CHARM NOW Even still seems to work after deleting it from Start Menu | Programs!
It'd be great if somebody could make a cab for 8925/Tilts that strips PTT and makes button 6 work, fixes this file and makes comm manager the default for button 6 press and record the default for press and hold... do it for the newbies... I'm no newbie (Started w/ MPX200... R.I.H.) but it took me a while to get it right (and the last step was iffy).
THANKS AGAIN though!!
Menneisyys said:
Now I understand what you mean. I've upped Record.lnk for you to http://www.winmobiletech.com/sekalaiset/Record.lnk . Just put it in AppButtons and, if it can't be seen from Settings / Buttons, \Windows\Start Menu\Programs
Click to expand...
Click to collapse
I've tried this fix and have one question. After installing the link when I press and hold the button it opens notes not voice recorder. It works but it's opening the wrong app. Any way to fix this?

Raphael hardware keys, remapping?

Has anyone come up with working solution for mapping hw keys?
I found this thread on Diamond, but no help:
http://forum.xda-developers.com/showthread.php?t=398280
I am using AEKMap to enable both latin/cyrillic input on my TP's hw keyboard. You may google it and give it a try.
There is no need for additional software, just follow this post and you'll get the answer. Worked for me.
Try AE Button Plus.
B.
I think you did not quite follow me here.
I dont mean to change layout of QWERTY, but hw-keys like "Back" and "Home" at front panel of TP.
This is becaus I find home and back quite useless and would much more prefer to have ALT+TAB (change program) and close program (REALLY close them, not leave running background as back seems to randomly do).
Taajuus said:
I think you did not quite follow me here.
I dont mean to change layout of QWERTY, but hw-keys like "Back" and "Home" at front panel of TP.
This is becaus I find home and back quite useless and would much more prefer to have ALT+TAB (change program) and close program (REALLY close them, not leave running background as back seems to randomly do).
Click to expand...
Click to collapse
And that is EXACTLY what i also want to know....
The total lack of hardware-keys on this device is already disturbing enough, but being locked out of the option to remap any of them is truely horrid...
Anyone know of any reg-hacks maybe?
I've got Spb PocketPlus 4 installed btw, and it's got a button mapping function as well...
But when i go into the buttons map, some weird black icons appear with no name attached to it. Can anyone make anything of this? As you can see i've been able to map one thing only: the Spb close-button-contex-menu, which allows me to switch task KW-buttons only....
But this is not enough for me, i need ALT-TAB aswell and off course a VoiceCommand button.
And regrettably the Rapael doesn't have that many HW keys to start with...
I want also to use Home/Back buttons for different purposes,but I didn;t found a solution yet.
Gotten a step closer to what i really need over this weekend:
In the button dialogue (with extra generated buttons by Spb PP+4) there was only one other button that had a name...
So i tried this one and go figure: it seems to be the " <= " (or 'back') button. In the dialogue it's called the OK button. I've got it set to the close contaxt menu now, and mapped Voicecommand to long-pressed answer key...
So far, this setup is to my satisfaction, and after two months of use this phone finaly behaves completely the way i want it to...
Hi, guys.
See my post here:
http://forum.xda-developers.com/showthread.php?p=2743845#post2743845
Hope this helps!
Cheers.
helped realy much !!! big thx for that nice instructions
You're very welcome, tk_berlin.
You be sure to let me know if anything in there doesn't make sense or you need any help with it.
Cheers from Canada!
ah cool to see a reply that fast ,)
hmm u got any further with finding out how to set the home button and the backwards button ?
Since the other htc user ,) wrote
In the button dialogue (with extra generated buttons by Spb PP+4) there was only one other button that had a name...
So i tried this one and go figure: it seems to be the " <= " (or 'back') button. In the dialogue it's called the OK button. I've got it set to the close contaxt menu now, and mapped Voicecommand to long-pressed answer key...
so it works with SPB PocketPlus ?
there must be a way to get it work wit the other tool
ah cool to see a reply that fast ,)
Click to expand...
Click to collapse
Lol. I was on my machine all morning and had XDA open in one of my tabs.
Yes, you can map practically any button in AEBPlus no problem.
hmm u got any further with finding out how to set the home button and the backwards button ?
Click to expand...
Click to collapse
AEBP will also *learn* any keys it doesn't have. So you could use the "Add Button" option, press your Home key, and away you go.
The way I have it set up, holding down the phone key will activate voice command (default behavior).
But remember, assigning commands to the Home or OK buttons (that "Back" button is actually an "OK" button) doesn't unmap what they normally do so you will always go home first and then it will perform <x>-function that you assign.
Personally, I don't like to program the Home or OK buttons because I find that they are "trickier" to press. What I mean is, if you tap the OK button near it's center or close to the left, it doesn't register a press. If you tap it sort of with the long part of your thumb (which is more natural when holding the device in one hand), it registers it. I've tried this with two TP's now and the button behaved the same way on both. Due to this, I find it unreliable to map anything to it.
In any case, as I mentioned earlier, the Volume buttons, Phone and End keys will be unmapped once you attach AEBP to them but the others will not.
Oh -- I forgot to mention, you can map the directional pad as well if that is your thing.
so it works with SPB PocketPlus ?
there must be a way to get it work wit the other tool
Click to expand...
Click to collapse
It does work, but it sends an OK command first.
I wrote a little utility for hard-coded buttons such as these for another Pocket PC I had (an ASUS P527) called "DoNothing.exe" but we can't apply that work-around here. What I would do is replace the EXEs of apps the hardware keys called with my DoNothing.exe, but in the case of the TP, we definitely don't want to replace START.EXE (which I believe to be the likely EXE (haven't tested this)).
If I find a way to map those buttons reliably, I will let you know, tk_Berlin. So far tho, I've been quite pleased with just using the four buttons I mentioned. The more I use this device and the more I ponder my decision to stay with TFL3D instead of the normal WM interface, the more I realize that I don't need half the add-ons I used to use prior to having TF3D. I am accustomed to very, very, very *heavily* customizing my device, but the setup I have now works great and I really haven't lost nething from my old WM world. In fact, prolly gained a few CPU cycles and memory to boot.
I don't miss the Today Screen at all!!! Now that I think about it, I never really looked at it.
Cya!

Fuze PTT button remapping problem

Before I start, I apologise if this has already been answered elsewhere, as I've spent about five hours trawling through threads looking, in vain, for a solution.
I have bought a new Fuze but the PTT button causes a problem with the aluminium case I bought for it. The problem is that the case is for a Touch Pro and the latch is right where the PTT button is (meaning the button is permanently depressed when the case is closed). It cannot be remapped in Settings/Buttons.
All I want to do is to be able to disable the button completely, or failing that make it an 'OK/Close' button. I have got rid of the PTT link but would greatly, greatly appreciate if someone could tell me what commands should be written in "short_PTT.lnk" and "long_PTT.lnk" to be able to do this. I've tried just leaving both blank but then the PTT button brings up an error message when pressed about not being able to find the shortcut.
Is there a way to achieve either of these solely using the registry, and without using third-party software?
Thanks for your time.
Here's full instructions on remapping your PTT button: http://www.fuzemobility.com/?p=598
To just disable it so it does nothing follow the steps at the beginning:
Using a registry editor delete HKLM\Services\PTT.
Next delete HKCU\Software\HTC\PTT.
Navigate back to the Windows directory and rename PTT to PTT2
Now create a new folder called PTT and set the properties as System and Read Only
If you follow all of those instructions and want to map it to close use this app and map it: http://www.fuzemobility.com/?p=1249
Problem fixed
You're a great person, bugsykoosh. I had done the first part you suggested, but the second link - and use of a tiny program called Zap It - fixed it perfectly.
Thank you heaps.
Okay so what is the joke why does this work for EVERYONE, except me. I mean seriously. I followed the steps but nothing. I press the button and I get nothing at all except the noise that indicates the keypress was succesfull WHAT GIVES.
bugsykoosh said:
To just disable it so it does nothing follow the steps at the beginning:
Using a registry editor delete HKLM\Services\PTT.
Next delete HKCU\Software\HTC\PTT.
Navigate back to the Windows directory and rename PTT to PTT2
Now create a new folder called PTT and set the properties as System and Read Only
Click to expand...
Click to collapse
This is overkill. You don't need to mess around with the PTT directory. If you just stop the PTT service from running, nothing will look in the PTT directory and its contents don't matter.
Just change HKLM\Services\PTT\Dll to an empty string and soft reset. The button will be completely inert. You can then remap it using AEBP or the short_PTT/long_PTT shortcuts, if you choose, or just leave it inactive.
Today
WMM,
If you change as you suggested, it looks like the long and short still work. I've remapped and did all the steps, but it looks like yours may be a little easier/cleaner. I'm curious, and I've looked extensively to no answer, but if I want the short press to just send my Fuze back to "Today" (in TF3D), is there a way to do that? If I press Start the first option is Today and this does exactly what I want. There's no shortcut that I can locate anywhere (and I'm sure it's my ignorance/technical inability) and the next step is to make a copy of that shortcut and name it short_PTT which I can handle. Any suggestions?
So, it isn't possible to map the PTT button from the Settings - Buttons screen? Looks like the method linked to above, with the short_PTT and long_PTT shortcuts, won't allow me to map the PTT buttons to work as the left and right softkeys.
As far as I know (which isn't very far, sometimes), the only way to get the PTT button to execute "Home" or the left/right soft keys is to use AE Button Plus. There may be applications that do those things that you can download (I know there are for things like toggling wifi and bluetooth, killing the current application, etc.) -- these are really tiny utility applications that are specifically intended for mapping to a button -- but I don't know of ones that do those particular things. (AEBP is able to do all those things, as well as giving you four mappable events -- single, double, triple, and long press).
okay seriously here do the links need to have special settings or anything. I mean what attributes should they have. Nothing works!
For the life of me, I can't remap my PTT button.
On a short press, it activates the voice command system.
On a long press, it activates the camera.
This seems to be from flashing NATF's ROM.
Following instructions above, I have no HKLM\Services\PTT or HKCU\Software\HTC\PTT in my registry editor.
I did the short and long_PTT/link and PTT folder in Windows. The links work there, but doesn't change what happens when the button is pushed.
I have AEButton Plus, but can't get it to add the PTT as a button.
Any suggestions where I can find in the registry what is making my PTT button act as it is? I'd rather have it do nothing than what it is doing now.
Thanks,
Chris
txemsdoc said:
On a short press, it activates the voice command system.
On a long press, it activates the camera.
This seems to be from flashing NATF's ROM.
Following instructions above, I have no HKLM\Services\PTT or HKCU\Software\HTC\PTT in my registry editor.
I did the short and long_PTT/link and PTT folder in Windows.
Click to expand...
Click to collapse
Yes, I believe NATF did not add the PTT stuff from AT&T into his ROM; the instructions above are for the stock AT&T ROM. You'll have to ask NATF how to remap the PTT button using his ROM.
jro2020 said:
okay seriously here do the links need to have special settings or anything. I mean what attributes should they have. Nothing works!
Click to expand...
Click to collapse
I'm not sure what you're talking about here. As I mentioned in my last posting just above this one, this probably only works in a ROM that supports PTT, like the stock AT&T ROM; if you're running something that doesn't support PTT, it would be a real surprise if "short_PTT" and "long_PTT" meant anything special, no? Assuming you are running the stock AT&T ROM, here's a step-by-step procedure for creating the short_PTT link to point to the Camera application using the built-in File Explorer.
1) Open File Explorer. If the drop-down box at the upper left says anything other than "My Device," tap the small down-arrow next to the label and then tap on "My Device."
2) Tap on "Windows" and wait a few seconds for the folder contents to appear.
3) Scroll down until you see "Camera" (the one that's 794K). Tap and hold that until the pop-up menu appears and then tap on "Copy".
4) Tap on "Menu" in the lower right, then "Edit", then "Paste Shortcut".
5) Scroll to the very bottom of the folder contents and you'll see "Shortcut to Camera" that was created. (The name may be truncated, depending on the size of the font and the screen orientation. Mine says, "Shortcut to Ca..." in portrait orientation. In any event, it will be the last thing in the folder contents.) Tap and hold on that until the pop-up menu appears and then tap "Rename". Then just type "short_PTT" to overwrite the existing name and hit return.
That's all you need to do. (If the application you want to run with the PTT button is in a different folder from \Windows, navigate there, tap-hold on the application executable, and select "Copy". Then navigate to \Windows and do steps 4 and 5 exactly as above.) This works exactly the same for the "long_PTT" shortcut.
If you do exactly that, does it not work? What happens if you tap the "short_PTT" shortcut in File Explorer? Does it start the camera?
Here is a link to a cab that will allow you to remap the PTT button: http://www.fuzemobility.com/ptt-remapping-revisited-application/
Remap PTT to launch phone Speed Dial?
I have disabled PTT so that I can use the button to launch programs - I just dont know how to launch phone speed dial - Does anyone know if there is a file that will launch speed dial that I can use to link to the PTT button?
Thanks!
pdafish said:
I have disabled PTT so that I can use the button to launch programs - I just dont know how to launch phone speed dial - Does anyone know if there is a file that will launch speed dial that I can use to link to the PTT button?
Thanks!
Click to expand...
Click to collapse
if your goal is to map your PTT button to call a single person check this posting: http://www.mobilitydigest.com/forums/showthread.php?p=3635
Here is another source that gives you step by step instructions.
http://htcblogger.com/2009/06/07/ho...utton-on-your-att-fuze-htc-diamond-touch-pro/
Note that if you're using the stock Fuze ROMs, the updated ROM from HTC adds the ability to remap the PTT button without any registry hacks.
PerfAlbion said:
Note that if you're using the stock Fuze ROMs, the updated ROM from HTC adds the ability to remap the PTT button without any registry hacks.
Click to expand...
Click to collapse
Can you post instructions as to how? I tried it already and the pulldown that shows you the available apps you can pick only shows PTT.
Best regards,
JD
So I followed the registry edit method, and created a file (not a folder) called PTT and things work great .... except ... when its on Airplane mode (Phone, Bluetooth and Data set to off) and I press the button (short or long) the PTT function kick off.
Is anyone else experiencing this?
Anyway to change this behaviour?
jdomi99 said:
Can you post instructions as to how? I tried it already and the pulldown that shows you the available apps you can pick only shows PTT.
Click to expand...
Click to collapse
Something's odd with your phone, then. Mine shows the full list of apps and options. I remapped PTT to VC without an issue.
Is it possible that you've got an application that's taking over the Buttons Control Panel? On mine, I had to remember to shut off SPB Pocket Plus's control over the buttons since it doesn't work with the Touch Pro line. When I first fired up the control panel, it listed no apps until I remembered that I had Pocket Plus running and turned of that feature.

Mapping button to access phone profiles

I'm currently running m2d on my polaris. I was wondering if there was a method for me to map one of the buttons on the phone so that it will open the phone profile windows (ie. normal, vibrate, silent). Its somewhat of a hassle to have to change the profile since it requires several button presses to do so.
Also, another idea would be to have a program that ran in the background and each time you pushed a mapped button on the phone, it would cycle through the different profiles. This way, you might not have to look at the phone when you want to change the profile (food for thought). Not sure if anybody or company has come up with this yet.
"long press end key"... an HTC software, changes between unmuted and vibrate. i use it all the time.
you can also find the shorts to switch between profiles in the forum and map it to hardware buttons (and even use cycles) using HButton

[TUT] Tasker - Hardware Button Control | Screen Off Media Player [BETA]

WARNING! THIS PROFILE IS IN BETA. DO NOT INSTALL UNTIL YOU HAVE READ BELOW!
Beta
When creating this profile I experienced bootloops and splash-screen freezes. If you are not comfortable with how to restore your device from these states, then please wait until it has been thoroughly tested before applying the profiles and tasks.
Testers
If there are any of you left after reading the above I was unable to totally identify what caused the crashes. I hope that through my own testing I have removed the probable causes, but I cannot promise. Read on if you’re still game and post below to let me know you’re in!
New to Tasker? Download your free trial from here
Theory
Have full media control using your device’s hardware buttons when the screen is off. Normal functionality restored when the screen is on.
Current Shortfalls/Work-in-progress
Fast reboot required to allow for system changes (15 second reboot).
- To my knowledge, system changes require this to take effect. Please tell me if you know different? As a consequence, the profiles take about 25 seconds from start to finish to activate and deactivate.
Hardware keys control media at all times, not just when the screen is off.
- A revert profile currently takes care of this, so it’s still more than usable.
Unable to configure hardware keys to only perform actions on long-hold
- I’m working on this, but I think it may be down to Gingerbread/kernel restrictions?
Unable to get trackpad click to perform an action
- Again, Gingerbread/kernel/ROM restrictions?
Ability to skip music folder commands unknown
- I’m working on this
Pop up menu tasks are ugly
- I’ll sort out a suitable background image and work out how to change the icons.
Preparation
This may look like another mammoth, ball-ache of a tutorial, but it’s pretty simple really – make yourself a coffee and by the time you’ve finished it, you’ll be done.
You must have full root read/write access.
1) Ensure you are running the latest version of busybox free from the Market. Even if your current ROM comes with it preinstalled, the Market version allows for this and will update it according. This is essential, as a probable cause of the bootloops I experienced. Reboot after updating it.
2) Install the Locale Execute Plugin free from the Market
3) Download Button Saviour Root free from the Market. We will be messing with the hardware keys, so if you lose control of them, this application will save you by displaying them on the screen. Have a play with this application and make sure you are fully versed with using it just in case.
4) Nandroid backup after you’ve done the above so you don’t have to reinstall everything again should things go wrong {We will be mounting the system for full write access}.
Installing and Customisation
Basically, we will be creating a file with the media controls in and asking Tasker to overwrite the existing file when we want to use it – simple.
Using a file explorer, create a folder within the sdcard/Tasker folder called ‘mediacon’. Within this folder, create another called ‘orig’. Navigate to
Code:
system/usr/keylayout/
Take a copy of the file bravo-keypad.kl (bravo will be replaced with your device name (unless you have a bravo!)). Paste it in the ‘mediacon’ folder you created. Paste another copy in the ‘orig’ folder. Open the file in the mediacon folder with a text editor on your phone (or alternatively copy/push it to your pc and view it there).
From the .zip file below, view the bravo-keypad.kl file on your pc using an application such as Notepad ++ (download free from here) or a simple text editor (although the layout may be a little confusing).
You’ll need to compare the two and see what the differences are. The most important additions to the bravo-keypad.kl to enable the media actions on the hardware keys are:
Code:
key 139 MENU WAKE_DROPPED
key 158 BACK
key 217 SEARCH
To:
Code:
key 139 MEDIA_PLAY_PAUSE WAKE
key 158 MEDIA_PREVIOUS WAKE
key 217 MEDIA_NEXT WAKE
The hardware key numbers and the remaining content of the file will no doubt be different from device to device, I assume it will also be different betweens ROMs and user settings too. You will need to preserve the remainder of the file.
Please can I ask you to post the contents of this file in ‘code’ tags if you can’t see that someone has done this for your device already. Could you also detail your ROM and Kernel. It will help others to quickly edit the file with the correct settings without scratching their heads too much – community spirit and all of that.
As you can see all we are doing is changing the three hardware buttons (menu, back and search) to perform media controls instead. You’ll need to edit the file in the ‘mediacon’ folder (either on your device or drag/push to your pc and then back again) to reflect this. Make sure you do not change the file in the ‘orig’ folder! Remember, your device may have different key numbers for the hardware buttons, this won’t matter, just edit the ones listed as menu, back and search and not the ones that have a # before them.
So, now you have your edited file done and your original file stored safely. We’re nearly there!
Install the profiles and tasks and make sure they are unchecked until you have edited them for your needs. The Tasker Media Control V1.zip folder contains the following two profiles:
MediaBoot
MediaControl
It contains the following 8 tasks:
ResetMedVar
MediaMenu
MediaContBoot
MediaContOff
MediaContOn
FastReboot
FastBootConfirm
ContState
The triggers for the tasks are:
Device Boot
Headset Plugged
If you currently have any other profiles that load music apps or perform other tasks when the headset is connected, please disable these.
Firstly, open the task MediaContOn. Click on action 4 (execute action) and select edit. You’ll see two mentions of the bravo-keypal.kl. Replace ‘bravo’ with your device name, or alternatively with whatever the original file was named in system/usr/keylayout/ (I assume it is your device name?). You’ll need to press the back button once you’re done.
Secondly, do exactly the same in the task MediaContOff.
Finally, open the task MediaContBoot and alter action number 2 to the music application you use (if you don’t use the stock android player).
That’s it! You’re done!
Terminal Command Information
There will be a number of terminal commands running, to copy and overwrite files which will mount the /system as read/write. This of course always has its risks, so ensure you have that nandroid backup just in case….
In the task FastReboot, there is the terminal command
Code:
Killall system_server
This command is not without its risks too, but it is the only way to avoid a full reboot in order to apply the system changes.
Running the task for the first time.
In the profiles and tasks, two variables are created:
%EARP – This is set to 2 when the headset is connected and 1 when it is disconnected. By removing the headset (%EARP =1), you will trigger the exit task which will begin to revert the media button changes.
%MEDIACONT – It was necessary to create this variable to avoid Tasker reacting to the headset plugged trigger after the reboot and wanting to start copying the files all over again. If %MEDIACONT = 2, Tasker will therefore know you are already controlling the hardware buttons and it will prevent the headset profile running again. The variable is changed to a value of 1, once the button controls are returned to normal. Simple hey…
When testing, sometimes these variables were showing the wrong value, due to the options to ‘cancel’ at various stages of the tasks. Before you connect your headset and run the profiles for the very first time only, you will need to open the task ResetMedVar and click on ‘test’. This will set both values to 1. At any point, if your variables go out of sync, you can repeat this exercise so the headset connected/disconnected will trigger the profile/exit task accordingly.
So, open ResetMedVar and click test to set the variables to 1. Tick the MediaBoot and MediaControl profiles to activate them and apply to exit Tasker. Insert your headset!
You’ll be prompted with the first pop-up asking if you want to active the media controls. Click to activate (it will disappear in ten seconds and cancel otherwise). Shortly after, a confirmation pop-up will confirm the files have been copied correctly. Shortly after that, another pop up will confirm you wish to proceed with the fast reboot. Click to activate and you’re device will reload the system. It should take around 15-20 seconds.
When the device boots back up, the Button Saviour application will be loaded, to ensure you have button control if things go wrong. Pressing the little arrow on the right hand side of the screen will enable a back button that you can press to back out of the screen. You media player should then load. Choose a happy tune (from a folder/album/artist that has more than one song) (not forgetting you can’t use the back button other than on the screen!) and turn the screen off.
Hopefully, search will skip forward a track, back will skip back a track and menu will play/pause the playback. WHOOP!
When you’ve finished testing, switch the screen back on, unlock it if necessary and then remove the headset. Tasker will then perform the above steps again, replace the files back to the original ones before confirming the fast reboot.
15-20 seconds later, hopefully all of your hardware buttons will then perform as normal!
Job done.
Extras
I couldn’t get the trackpad/optical joystick to perform an action on my device. There is an entry at the very end of MediaContOn and MediaContOff after the STOP. These entries copy and reversely delete a curcial-oj.kl file to /system/usr/keylayout/ that is supposed to enable the trackpad to work. Drag these to position 5 if you’d like to test them on your device to see if they work. Let me know!
Credits
localh0st for the curcial-oj.kl file here
Decad3nce for his key remapping guide here
The mass of other threads I read through on XDA to gain the knowledge to do this and the devs of the free apps mentioned above - I'm sure they'd appreciate a donate.
Oh and of course the dev of Tasker! What an application.... (I'm not on commission I promise!)
FAQ
Q) I have many other Tasker questions, can I post them here??
A) To avoid clutter, probably best to use this official Google group
Q) Where can I learn more about Tasker?
A) The manual and Profiles and step-throughs on the Tasker wiki and you’ll be up to speed in no time.
Change Log
Confirming pop up tasks may be removed in V2.
Bugs
Let me know...
Future Changes/Requests
Find another way to apply system changes without the need of fast reboot.
Hardware keys to only control media when the screen is off.
Configure hardware keys to only perform actions on long-hold to avoid 'pocket-presses'.
Get trackpad/optical joystick click to perform an action
Enable the ability to skip music folders and/or directories.
Pop up menu tasks need sprucing up.
Installation Instructions
In menu options/profile data 'Import One Task':
ResetMedVar
MediaMenu
MediaContBoot
MediaContOff
MediaContOn
FastReboot
FastBootConfirm
ContState
In menu options/profile data 'Import One Profile':
MediaBoot
MediaControl
The thanks meter lets me know I'm appreciated!
Heh, looks like Brandall is taking Tasker to new heights.
Nice work mate, but I just have to add something though...
Using this can help, BUT, it can also "cripple" those Tasker scripts you've posted about battery saving.
Using Tasker for zipping files and extracting them loads my CPU to the max, also, anything that uses notifications and file reads/writes does that too, eventually, using more battery...
Using this I can see a situation where some user might just lock/unlock their screen very often and rapidly, this might cause a major stress on the CPU, ultimately, nulling and voiding your battery saving scripts and potentially causing harm to CPU/battery/device.
And in any case, turning the screen on to switch tracks is really not that much of a hassle, for me anyway.
This is how I see it, just my 2cents.
But keep up the good work buddy, you seem to have been able to utilize Tasker to a MUCH greater extent than what I was able to, will definitely follow your posts.
Gramlengo said:
Heh, looks like Brandall is taking Tasker to new heights.
Nice work mate, but I just have to add something though...
Using this can help, BUT, it can also "cripple" those Tasker scripts you've posted about battery saving.
Using Tasker for zipping files and extracting them loads my CPU to the max, also, anything that uses notifications and file reads/writes does that too, eventually, using more battery...
Using this I can see a situation where some user might just lock/unlock their screen very often and rapidly, this might cause a major stress on the CPU, ultimately, nulling and voiding your battery saving scripts and potentially causing harm to CPU/battery/device.
And in any case, turning the screen on to switch tracks is really not that much of a hassle, for me anyway.
This is how I see it, just my 2cents.
But keep up the good work buddy, you seem to have been able to utilize Tasker to a MUCH greater extent than what I was able to, will definitely follow your posts.
Click to expand...
Click to collapse
Hi Gramlengo, I guess I can count you out as a Beta Tester!?
The logcat/zipping entries should be deleted from the other profiles if you aren't analysing them anymore to see what your phone is up to. As you said, you will use much less resource that way (they will be removed in next release)!
I do a lot of running, so being able to skip track through my pocket (without waking the phone) is essential = my motivation for working this out. For me, being in screen off state therefore won't clash with the other profiles... although saving battery power wasn't a consideration in this profile - there is plenty to spare these days The notifications are for testing and user interaction - I don't use them in my profile, it just overwrites the file and reboots...
I'm running out of ideas for the next profile, I'm open to suggestions! Good to hear you're following my posts, I'll look forward to your feedback - now sign up for this beta, you know you want to....!
Heh, I'd love to be beta testing your ideas!
Gramlengo said:
Heh, I'd love to be beta testing your ideas!
Click to expand...
Click to collapse
Looks like you might be alone there!!
Alright, finally got a time to test this one:
First, I plugged in my headset and got the two pop-up questions which I clicked activate on. Then, nothing happened. After about 10-15 seconds I got a superuser request for the locale execution plugin which i clicked allow and remember my choice on. Still nothing happened. After another 10-15 seconds I got another superuser request from busybox and quickly after a superuser request from locale execution plugin, both which I clicked allow and remember my choice on.
Then the phone finally fast-rebooted. When it was back up and fully loaded, the music application started. I started a tune, switched off my phone screen, and clicked the back button, nothing happened. I clicked the search button, nothing happened. I turned the screen back on, and hey, the back button still functioned as a back button, and the search button still worked as a search button.
What did I do wrong?
My device is a desire HD running leedroid Hd (latest version and kernel).
Does this have something to do with the Desire HD having capacitive buttons?
Will try again, but this time by remapping the physical volume buttons and the physical power button.
I have also attatched the original keymapping file, and my modified one.
Edit: That didn't work. Opened root explorer to see if the values were right, and they were. I also noticed another keymapping file called "spade-keypad-v0.kl" (without the "). Will try to edit the values in this file to see if that will work.
Edit2: Editing the back,menu and search button in spade-keypad-v0.kl didn't work. Will try to remap the volume and power keys.
Edit3: Ok, two more combinations to test: Editing the capacitive buttons in both files, and afterwards editing the physical keys.
Edit4: No luck, I have attatched the other spade-keypad-v0.kl for you to look at. Hope you can fix this!
torsrex said:
I have also attatched the original keymapping file, and my modified one.
Edit: That didn't work. Opened root explorer to see if the values were right, and they were. I also noticed another keymapping file called "spade-keypad-v0.kl" (without the "). Will try to edit the values in this file to see if that will work.
Edit2: Editing the back,menu and search button in spade-keypad-v0.kl didn't work. Will try to remap the volume and power keys.
Edit3: Ok, two more combinations to test: Editing the capacitive buttons in both files, and afterwards editing the physical keys.
Edit4: No luck, I have attatched the other spade-keypad-v0.kl for you to look at. Hope you can fix this!
Click to expand...
Click to collapse
Appreciate your testing torsrex. Nothing's ever simple is it... Did you fast reboot every time you applied changes to the files?
In the file spade-keypad-v0.kl, did you set them like this:
Code:
key 102 HOME WAKE_DROPPED
key 139 MEDIA_PLAY_PAUSE WAKE
key 158 MEDIA_PREVIOUS WAKE
key 217 MEDIA_NEXT WAKE
Check they had applied with a file explorer first and then fast rebooted?
Let me know!
I checked that the files were changed every time with root explorer. I also tried a normal reboot if the fast reboot didn't work (Did this all the times I had changed a file), and I tried copying the files manually with root explorer.
I tried to change the values of the spade-keypad-v0.kl to what you typed, but that didn't work either. Maybe I should also mention that after I changed the back-key, menu-key and the search-key to media controlls, the home button also won't work.
Does this have something to do with having capacitive buttons and not physical buttons (I think the button turns them self off when I put on the screen lock)?
torsrex said:
I checked that the files were changed every time with root explorer. I also tried a normal reboot if the fast reboot didn't work (Did this all the times I had changed a file), and I tried copying the files manually with root explorer.
I tried to change the values of the spade-keypad-v0.kl to what you typed, but that didn't work either. Maybe I should also mention that after I changed the back-key, menu-key and the search-key to media controlls, the home button also won't work.
Does this have something to do with having capacitive buttons and not physical buttons (I think the button turns them self off when I put on the screen lock)?
Click to expand...
Click to collapse
Ok, sounds like you've been pretty thorough. I knew the set-up would be different device to device, but didn't think it would be difficult to establish how.
I guess all we can do is use an app to discover the changes that need to be applied on your device. Check out ButtonRemapper and after it applies the updates, take copies of the files it has adjusted (assuming the app works for you!). Let me know!
Tried the buttonRemapper application from the market, and It worked! The buttons (menu, back and search) got remapped, but I noticed that the screen needed to be turned on before I could press them (no need to enter any pin code or dragging down the slider, just pressing the unlock button). I have atattched all of the kl-files.
torsrex said:
Tried the buttonRemapper application from the market, and It worked! The buttons (menu, back and search) got remapped, but I noticed that the screen needed to be turned on before I could press them (no need to enter any pin code or dragging down the slider, just pressing the unlock button). I have atattched all of the kl-files.
Click to expand...
Click to collapse
Ok, I'm confused now... I can't see any difference between what you did to what the app has done...? Can you?
When the changes are applied in the app, it must take a copy of the original files it's about to change and store them somewhere. Is there a ButtonMapper folder on the SD card? Perhaps have a look in there when the controls are changed for media? See if there is just one file, or if there's an additional one we haven't considered..?
Then we'll solve the screen off use!
Hm, can't find the backup folder, it isn't on the sd card and it's not in the keylayout folder.
torsrex said:
Hm, can't find the backup folder, it isn't on the sd card and it's not in the keylayout folder.
Click to expand...
Click to collapse
Damn it! I'm going to have a search around and see what I can come up with... I'll be back...
Is your device fine after the fast reboots? That's why I put this as a beta as I didn't know how stable it would be compared to a full reboot...
Using the buttonremapper application, I didn't face any issues. Using the tasker-profiles (editing the files manually) caused the home button, back button, menu button and search button to not function any more and I had to restore a nandroid backup. Maybe you should get the correct setup files for each phone before you take it out of beta
By the way, I sent a message to the developer asking him where the buttonremapper application saves it's backup-files, hopefully I will get a quick answer!
torsrex said:
Using the buttonremapper application, I didn't face any issues. Using the tasker-profiles (editing the files manually) caused the home button, back button, menu button and search button to not function any more and I had to restore a nandroid backup. Maybe you should get the correct setup files for each phone before you take it out of beta
By the way, I sent a message to the developer asking him where the buttonremapper application saves it's backup-files, hopefully I will get a quick answer!
Click to expand...
Click to collapse
Good work! And thanks for testing... I need a lot more volunteers like you for each different device, but I don't see them flocking!
Just got a reply from the developer: "in its data directory in the subdirectory files: /data/data/com.beansoft.buttonremapper/files."
So here you go.
torsrex said:
Just got a reply from the developer: "in its data directory in the subdirectory files: /data/data/com.beansoft.buttonremapper/files."
So here you go.
Click to expand...
Click to collapse
Good work again Sir! I'll take a look at the files and see what else is needed for devices with capacitive buttons (which I'm hoping is the only difference...).
Someone just released a trackpad wake for all AOSP ROMs (without messing with the kernel?) over in the Desire forum, so I'm currently looking at that too...
Always something to do... speaking of which, I need you over here next
So I was bored tonight and thought I'd try and revive this project.
What I've got is still a work in progress, but it basically involves using Buttonremapper to reassign volume_up and volume_down to fast_forward and rewind, then use Tasker's 'state: media button pressed' to forbid any other apps from responding to those two buttons and have them act out Tasker tasks only.
One button is set to play/pause media (if screen is off) and raise volume (if screen is on) and the other set to skip forward media (if screen is off) and lower volume (if screen is on). The end result is almost full media control from hardware buttons without having to look at the phone or take it out of your pocket: use the volume up and down buttons to skip and pause tracks, or press power to turn the screen on and change their function to volume up or down temporarily before reverting back to skip and pause as the screen times out. You don't need to be looking at the screen while this is happening.
The problems at the moment are:
1) While two buttons have effectively been made into four, there are five necessary functions - volume up, volume down, play/pause, next track, previous track. I figured previous track was the least important but it would be nice to have it as well.
2) Normally the volume buttons in Android are context-sensitive, changing media or system or whatever volume depending on where you are. With this they're always assigned to media volume, so you'd need an app like Audiomanager or something to change the volume of other things.
3) Other problems that I haven't realised yet.
One other thing, Tasker's 'state: media button pressed' lets you set both long presses and short presses, but they don't seem to play nice together. I think both the long press and short press tasks activate and conflict when the button is held down, but I haven't had a look at this yet.

Categories

Resources