[App] ButtonRemapper - Beta v0.2.4 (New Galaxy S version added)

Search This thread

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
Important questions will be marked with the tag FAQ when they are answered in this thread. Search for FAQ with the "search this thread" button to fetch them.

-------- Update notes --------

Update (Jan 22): New, separate version for the Samsung Galaxy S (This version is not compatible with the Galaxy S variants like the Captivate and Vibrant. A version compatible with these devices will be posted soon)

A special version for the Galaxy Tab can be found here .



------ Initial Announcement --------

* Beta* for full rooted devices. (NAND unlocked. Full, permanent write access to the system dir is needed)

Tool to remap the hardware buttons. Or better: a generic tool to edit the key layout map file Android uses to map the keys. (For info about key layout files, see:
http://xdaforums.com/showthread.php?t=695936 and
http://source.android.com/porting/keymaps_keyboard_input.html)

Supported devices: All, except Samsung Galaxy S variants (only partial support. Update: new, separate version for SGS attached to this post), Droid 2 and Huawei U8110/Android 2.1. On the Vibrate and Captivate only a few buttons can be remapped.
(If you have issues with your device, please let me know)

buttonremapper1.png
buttonremapper2.png


Functions that can be assigned:
Code:
            "Power",
            "Home",
            "Menu",
            "Back",
            "Search",
            "Volume up",
            "Volume down",
            "Camera",
            "Focus",
            "Endcall",
            "Call",
            "Media Play Pause",
            "Media Stop",
            "Media Next",
            "Media Previous",
            "Media Rewind",
            "Media Fast Forward",
            "Dpad center",
            "Dpad up",
            "Dpad down",
            "Dpad left",
            "Dpad right"

As it with all root apps a Nandroid backup is adviced, because you never know.

Tips
In generall, these are the codes of the keys on a standard Android device (for people who can also edit the keyboard codes of a hardware keyboard):
Code:
		102, // home button
		114, // Volume down
		115, // Volume up
		116, // Power
		139, // Menu
		158, // Back
		217, // Search`
		231, // CALL              
		232, // DPAD_CENTER      
		108, // DPAD_DOWN        
		103, // DPAD_UP           
		105, // DPAD_LEFT         
		106, // DPAD_RIGHT  
		211, // HEADSETHOOK
		212, // CAMERA
		242  // FOCUS


Attached is a little helper app (KeynrTracker.apk) to identify the keynumber you want to remap .

Faq

Q: can you do also other remappings with the buttons, like for example long pressing, double press, context sensitive remappings etc.
A: For now, this is pretty much it. Check out LaunchKey if you also want to remap the long-press search button.

Q: So this is it?
A: I do plan to add some more functionality and to update the interface, but when that will be I can't tell.

Reviews

Review by Android Police

Review by Gizmoninja

Changelog
v0.2.4: Fixed restore problem on some devices (Thanks ljjehl for noticing)

v0.2.3: Hasn't never been released :)

v0.2.2: * Added support for the Droid X (Thanks Doug for your feedback!) * added an option to hot reboot the device after applying a change, so one can almost change buttons on the fly.

v0.2 Fixed UI issues * Fix for Galaxy S Variants * added (camera) focus as an option to the "remap list"


--
If you like the app and/or wish to support this project consider buying the donation version from the market (Search term: ButtonRemapper). Don't feel obliged though!
 

Attachments

  • KeynrTracker.apk
    8.3 KB · Views: 95,222
Last edited:

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
So on a nexus 1, this will only remap the power, volume rockers and possibly trackball? Will it work for the capacitive buttons?

Absolutely. It will remap all buttons. I added a list of functions that can be remapped. (Also hardware keyboards can be remapped with this app... )

I plan to integrate this with the LaunchKey app in the future, so it would be possible to assign also apps etc to buttons.
 

overground

Retired Senior Moderator / Inactive Recognized Dev
What's "Grave" ? And there's 2 search entries and 3 menu entries. A little confusing. Are these for long press, double tap, etc. or are those for possible layouts across devices? How does one get to the "Apply" screen pictured? Will play around some more.
 
Last edited:

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
What's "Grave" ? And there's 2 search entries and 3 menu entries. A little confusing. Are these for long press, double tap, etc. or are those for possible layouts across devices? How does one get to the "Apply" screen pictured? Will play around some more.

Well, I don't know :D
At the moment this app is just a tool to play around with the low level key layout mapping files Android uses for mapping the keys. It's sort of a power user tool.

In the future I'll need this layer to make a user friendly key remap tool that can do some low level remapping. Then I will hide much of the definitions that can be tweaked with this app.

Some background info about the key layout mapping files:

http://source.android.com/porting/keymaps_keyboard_input.html
 
Last edited:

ldc2335

Senior Member
Apr 18, 2010
681
342
SWEET, im wondering if it will eventually be possible to use search button on evo to actually take pics(not just open the camera)
 

hav0c

Senior Member
Dec 14, 2005
883
156
Amsterdam
Just what I needed. Thanks a lot appelflap.

Would be nice to have the "call" and "end call" function on 1 button (because the only button I do not use on my DHD is the search button..) Don't know if that is possible tho..

Thanks again!

Edit: I'll donate on the final version for sure.
 
Last edited:

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
SWEET, im wondering if it will eventually be possible to use search button on evo to actually take pics(not just open the camera)
It's possible to add a "focus" mapping. Haven't tested that one out yet. Maybe it will focus and take a picture in one step. I will add the function so one can test that out.


Just what I needed. Thanks a lot appelflap.

Would be nice to have the "call" and "end call" function on 1 button (because the only button I do not use on my DHD is the search button..) Don't know if that is possible tho..

Thanks again!

Very good idea. I think it's possible

----

@all: I really like to know if this works on your device. If so, I can update this app with the functionality of the LaunchKey app and lots and lost of more functionality.
 
Last edited:

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
SWEET, im wondering if it will eventually be possible to use search button on evo to actually take pics(not just open the camera)

Assigning CAMERA to a button will open the camera, but it will act as a shutter too if you have the camera open! So yes it is possible to use the search button to take pics
 

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
Opens and asks for SU permission on first run, but force closes immediately and every time opening afterwards.

Phone in sig.

That's definitely not good :) It would be great if you can send me a logcat.
You can download catlog from the market, open it, open the buttonremapper app, wait till it Force closes and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.

Would be great and very helpfull if you can do that. Thanks
 
Last edited:

appelflap

Inactive Recognized Developer
Feb 9, 2008
4,202
830
Utrecht
unfortunely doesn`t work on X10

Do you get a FC or does the remapping not work? Anyway if you like this to work, maybe you can send me a log.

This is how you can do it (quote from another post):
Download catlog from the market, open it, open the buttonremapper app, and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.

Thanks.
 

Crowds

Senior Member
Jun 9, 2008
3,709
2,224
48
Azeitão
nivelcosmeticos.com
OnePlus 3
Do you get a FC or does the remapping not work? Anyway if you like this to work, maybe you can send me a log.

This is how you can do it (quote from another post):
Download catlog from the market, open it, open the buttonremapper app, and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.

Thanks.

sorry but strangely after remove and install again it work:confused:

go and play a little the give you some feedback;)
 

creator2456

Senior Member
Jul 12, 2010
824
184
Chicago
OnePlus 8T
That's definitely not good :) It would be great if you can send me a logcat.
You can download catlog from the market, open it, open the buttonremapper app, wait till it Force closes and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.

Would be great and very helpfull if you can do that. Thanks

Here's a logcat for ya...zipped for size.
 

Attachments

  • 2010-11-25-05-42-02.txt.zip
    14.9 KB · Views: 190

Top Liked Posts

  • There are no posts matching your filters.
  • 144
    Important questions will be marked with the tag FAQ when they are answered in this thread. Search for FAQ with the "search this thread" button to fetch them.

    -------- Update notes --------

    Update (Jan 22): New, separate version for the Samsung Galaxy S (This version is not compatible with the Galaxy S variants like the Captivate and Vibrant. A version compatible with these devices will be posted soon)

    A special version for the Galaxy Tab can be found here .



    ------ Initial Announcement --------

    * Beta* for full rooted devices. (NAND unlocked. Full, permanent write access to the system dir is needed)

    Tool to remap the hardware buttons. Or better: a generic tool to edit the key layout map file Android uses to map the keys. (For info about key layout files, see:
    http://xdaforums.com/showthread.php?t=695936 and
    http://source.android.com/porting/keymaps_keyboard_input.html)

    Supported devices: All, except Samsung Galaxy S variants (only partial support. Update: new, separate version for SGS attached to this post), Droid 2 and Huawei U8110/Android 2.1. On the Vibrate and Captivate only a few buttons can be remapped.
    (If you have issues with your device, please let me know)

    buttonremapper1.png
    buttonremapper2.png


    Functions that can be assigned:
    Code:
                "Power",
                "Home",
                "Menu",
                "Back",
                "Search",
                "Volume up",
                "Volume down",
                "Camera",
                "Focus",
                "Endcall",
                "Call",
                "Media Play Pause",
                "Media Stop",
                "Media Next",
                "Media Previous",
                "Media Rewind",
                "Media Fast Forward",
                "Dpad center",
                "Dpad up",
                "Dpad down",
                "Dpad left",
                "Dpad right"

    As it with all root apps a Nandroid backup is adviced, because you never know.

    Tips
    In generall, these are the codes of the keys on a standard Android device (for people who can also edit the keyboard codes of a hardware keyboard):
    Code:
    		102, // home button
    		114, // Volume down
    		115, // Volume up
    		116, // Power
    		139, // Menu
    		158, // Back
    		217, // Search`
    		231, // CALL              
    		232, // DPAD_CENTER      
    		108, // DPAD_DOWN        
    		103, // DPAD_UP           
    		105, // DPAD_LEFT         
    		106, // DPAD_RIGHT  
    		211, // HEADSETHOOK
    		212, // CAMERA
    		242  // FOCUS


    Attached is a little helper app (KeynrTracker.apk) to identify the keynumber you want to remap .

    Faq

    Q: can you do also other remappings with the buttons, like for example long pressing, double press, context sensitive remappings etc.
    A: For now, this is pretty much it. Check out LaunchKey if you also want to remap the long-press search button.

    Q: So this is it?
    A: I do plan to add some more functionality and to update the interface, but when that will be I can't tell.

    Reviews

    Review by Android Police

    Review by Gizmoninja

    Changelog
    v0.2.4: Fixed restore problem on some devices (Thanks ljjehl for noticing)

    v0.2.3: Hasn't never been released :)

    v0.2.2: * Added support for the Droid X (Thanks Doug for your feedback!) * added an option to hot reboot the device after applying a change, so one can almost change buttons on the fly.

    v0.2 Fixed UI issues * Fix for Galaxy S Variants * added (camera) focus as an option to the "remap list"


    --
    If you like the app and/or wish to support this project consider buying the donation version from the market (Search term: ButtonRemapper). Don't feel obliged though!
    2
    Is there a possiblty to set double click or long press on remapped buttons? Or a option to choose an app when the remap will be working? In example i want to remap volume buttons to be next/prev song when the music is playing.
    2
    Hi, using Acer-Liquid with Froyo (Of course, rooted) are not all the buttons. leaving only one (226 Headsethook)

    Instead using Eclair are all without problems.

    you can update with a fix?

    (Google Translate)

    Interesting. Seems that the Acer-Liquid uses a similar approach as the Galaxy S variants. I think I can fix it with a general heuristic. Can't say when though. :)

    I ran this and it says (0) when i push my trackpad.

    When running the key remapper tool, it doesn't have (0) as a listed button to remap.

    Does this mean, its not possible?

    I use a android function (getScanCode) for this and in the docs for this function/method it is said that:
    Code:
    public final int getScanCode ()
    
    Since: API Level 1
    Retrieve the hardware key id of this key event.[B] These values are not reliable and vary from device to device[/B].
    Mostly this is here for debugging purposes.
    So I wouldn't infer anything conclusive out of the output of the helper app.

    Take a look at this doc:
    http://developer.android.com/reference/android/view/KeyEvent.html
    The constants here are different constants than used in the second column of the list in the buttonremapper app, but to some degree they correspond to eachother.
    When you look at the dpad constants you see that it is stated that "May also be synthesized from trackball motions."
    (The numeral values of the constants are complete different values than the scancodes displayed in the helper app: don't infer anything from it)
    2
    I had the same problem, opened the .kl (keylayout) file, which is what this app modifies, and there was no entry for the home button. I added it back in and it works again. The code for it is 139 on my i896 captivate.

    The file is in /system/usr/keylayout/melfas-touchkey.kl
    1
    So on a nexus 1, this will only remap the power, volume rockers and possibly trackball? Will it work for the capacitive buttons?