• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Remap Volume Key Long-Press?

rubejb

Android Enthusiast
With the Optimus V I had CM7 installed, and it had an option for long-press volume-up to skip tracks, and volume-down would go back a track.

But since I listen to mostly podcasts, I went in with root explorer and changed the physical search button to be fast-forward to get past boring parts.

Since the Triumph doesn't have much in the way of physical buttons, I was trying to use the long-press volume keys to FF and rewind the current track.

I've gone to /system/usr/keylayout (this is the directory of the Optimus's settings)

But there are a number of .kl files in that folder. Does anyone know which is the one the Triumph uses for the physical keys? I'm assuming it's the "fbx_kybd.kl" since there are only 4 keys listed in it.

Also, what would key values would I add to the file to make my FF setup work?
ex:
key ??? MEDIA_FAST_FORWARD
key ??? MEDIA_REWIND

Thanks!
 
Is there any way that I could use the long key press for a hard camera button to take pictures? Sorry if it's a stupid question.
 
Is there any way that I could use the long key press for a hard camera button to take pictures? Sorry if it's a stupid question.

Not a stupid question at all. And yes, in theory you should be able to do that.

I'm just not sure what values to put in for the long-press volume keys, or if the long-press can even be assigned to them.

I'm hoping someone with more advanced knowledge can give a hand.

I'll reply here if I find the answer elsewhere.
 
I've been playing around a bit with the key mappings... I got volume up to be the camera button but the change is global. I think i'm gonna try replacing the search button for camera instead.

EDIT: I'm happy with search as the camera button. Press it to start up camera and then press it to take pics. It's a lot more convenient of a position for me to push with my thumb at the top while holding the phone in landscape with one hand than pushing the shutter button at the bottom.
 
I've been playing around a bit with the key mappings... I got volume up to be the camera button but the change is global. I think i'm gonna try replacing the search button for camera instead.

EDIT: I'm happy with search as the camera button. Press it to start up camera and then press it to take pics. It's a lot more convenient of a position for me to push with my thumb at the top while holding the phone in landscape with one hand than pushing the shutter button at the bottom.

Would you mind sharing which app you used to remap the camera?

I've used ButtonRemapper to set the volume up key to media play/stop as I use the Triumph for audio
 
Would you mind sharing which app you used to remap the camera?

I've used ButtonRemapper to set the volume up key to media play/stop as I use the Triumph for audio


I didn't use an app I edited the keymapping files in /system/usr/keylayout
 
Hey Uguu, any chance you might have some spare time to grace us with your knowledge on how you did that. I would love to change the volume down key to a hard camera button and make the search button lower volume.

Thank You Uguu,

~Novak
 
Hey Uguu, any chance you might have some spare time to grace us with your knowledge on how you did that. I would love to change the volume down key to a hard camera button and make the search button lower volume.

Thank You Uguu,

~Novak

I wasn't sure which .kl file the triumph actually uses or if it does, in fact, use all of them because i found duplicate mappings in most of them. I just edited all of them lol. If anyone knows, that'd be great for future reference.

For what you want to do, in all of the .kl files do a search and replace.
search and replace VOLUME_DOWN with CAMERA
search and replace SEARCH with VOLUME_DOWN

Before you do anything, I suggest you make a nandroid backup or make a copy of /system/usr/keylayout, or a combination of both.... just in case.
 
So we still haven't figured out how to map a volume button long press?

Yeah, this is still what I'd like to do. I want to keep the normal volume controls the way they are, but change the long-press controls.

I just need to know what key values correspond to the volume long-press.

When I was mucking around with the Optimus buttons I found posts and documents that actually referred to the Optimus .kl files. I guess the Triumph is still too new.

As far as which .kl file the phone actually uses (perhaps it uses them all, I don't know), when I installed the Button Remap program from the market, it seemed to reference fbx_kybd.kl. And when I modified that file manually it made the remap program stop working.

The problem I'm having is that I know enough to safely follow what others have found, but I can't figure it all out on my own. :)
 
Either way it is still progress if someone doesn't use the volume keys that much like myself, then just remapping the keys is beneficial but a long press would be nice as well not having to edit the keys

either way, thank you very much Uguu!

~Novak
 
I was going to repost this message now that Tickerguy's CM7 port is quite stable, but instead I'll just ask again.

Now that the phone has CM7, there is the option to use the volume long-press as skip / previous track.

Is there a way, through editing of the .kl file to make the long-press volume keys fastforward/rewind instead?

Thanks!
 
This is supported native in CM7 if the screen is off. Just go into the CM7 configuration settings - it's right there.
 
This is supported native in CM7 if the screen is off. Just go into the CM7 configuration settings - it's right there.

That's skip track, I want to fast forward.

I don't have CM7 installed at the moment, but if I recall the wording made me believe it was what I wanted but it's not.

Basically since I listen to long podcasts, I want the ability to seek through the track. What CM7 has for options only allows you to skip to the next track.
 
Back
Top Bottom