[ALL][CWM][APK]Hard-Keys editor app! (Volume keys to whatever you want!)

Do you like having physical Menu and Back Keys

  • Yessir!

    Votes: 191 88.4%
  • No sir, I don't like it!

    Votes: 25 11.6%

  • Total voters
    216
Search This thread

EpicFail236

Retired Recognized Developer
Jun 5, 2008
98
28
San Francisco
Hey everybody!

***New APK editor added! Set the keys to whatever you want, see below!***

****I will not be held responsible if your Nook Color starts eating babies!!****

****Or if it breaks either!!****

****Added a revert, for those who may have issues returning the keylayout to stock (like 1.1 users who can't run the keylayout app)****

****As an added request, if anyone knows how to reload the keylayouts sans reboot, please let me know, as that is really the only thing missing from this little thing. I would love to be able to quickly reload these as needed.****

So after creating the flashable zip file for the keylayouts, and receiving some feedback that implied it would be nice to have more options, I decided to brush up on the coding skills and write a nice little app that can re-write the keylayout files without having to flash anything. This is actually my first android app, so please provide me with any feedback you may have, the more the better. The way I see it, the more I know, the better things I can make.

The keylayout app currently supports mapping the volume keys to these items:

Volume Up
Volume Down
Menu
Back
Search
D-pad Center

and can additionally support wake on press, if desired. Once written, you will need to reboot your device for the keylayout to be effective, but it's still easier than manual edits or multiple flashes.

***Note that using the app requires su access, and also at this point requires that you first flash one of my v5 keylayout zip files***

***I have received notice that the application does not run on stock rooted 1.1.0 I will be looking into this and posting an update, and most likely a revert to stock zip in case anyone needs it.***

Thanks go to whoever first suggested this, I'll be damned if I can't remember who I got this from, but thank you, whoever you are, I'll be sure to give you props when I figure out who you are. :)

History over, now for the details:


To install: Simply flash either zip file in CWM after flashing your CM7 or Honeycomb build to your eMMC. Once you do this, you can install and use the apk file to make changes to the keylayouts to your heart's content.


The CWM zips have been confirmed to work on most all versions of android for the nook, and in theory, the APK should work as well, however YMMV. If it works, or if it doesn't, please please post your version or build info, and let us all know what works and what doesn't.

Feedback and/or critiques accepted, may be subject to rebuttal. Hope this helps someone else, and thanks to everyone on this forum for all the hard work you do!


FYI: For those who still want an easy way to change the volume when these keys are no longer volume keys, try replacing the longpress home app with Recent Plus, by local forum contributor timoskrempel, which I first found HERE and works very well as a replacement.

Version History
-----------------------
apkv0.1b - Initial version of the keylayout app. Feedback appreciated.

v5: added files that apparently weren't as useless as I assumed. Also created inverted keys zip, use INV zip to switch the buttons.

v4: removed useless files from update zip, cause I'm being a bit too perfectionist.

V3: added files to improve compatibility (HC v4 tested, should work on Froyo, maybe stock)

V2: removed wake on press (thanks jasoraso)

V1: First Version
 

Attachments

  • Keysmod-CM7-HC-v5.zip
    204.6 KB · Views: 3,315
  • Keysmod-CM7-HC-INV-v5.zip
    204.6 KB · Views: 876
  • NookKeyEditor-0.1b.apk
    20.3 KB · Views: 2,571
  • Keysmod-revert.zip
    195.1 KB · Views: 776
Last edited:

jasoraso

Senior Member
May 24, 2007
581
177
Salt Lake City, UT
I definitely prefer hard keys, even with the modifications in CM7. I'll give your zip a try next time I flash a rom (I've already changed my qwerty.kl on this rom).

One other thing - I also prefer to remove the "wake" for those 2 keys, I found that the NC was accidentally waking up from inadvertent keypresses on the volume keys ...
 

digitalslacker

Senior Member
Sep 22, 2010
59
6
Arnold, MD
I love this. always get stuck in pics in Facebook and can't get back.

Question though, what do you all use for a good alternative to adjust the volume on the fly?
Is there a preferred widget? Right now i just have a ADW shortcut to the sound settings on the home screen.
 

EpicFail236

Retired Recognized Developer
Jun 5, 2008
98
28
San Francisco
I love this. always get stuck in pics in Facebook and can't get back.

Question though, what do you all use for a good alternative to adjust the volume on the fly?
Is there a preferred widget? Right now i just have a ADW shortcut to the sound settings on the home screen.

Widgetsoid has a volume adjuster that I use, though more often I just use headphones with volume sliders built in, so I skip using the software entirely. Ideally, I would love to be able to mod the framework to add a quick volume adjust button to the status bar like the softkeys, however that involves code editing that I just haven't dug into yet. If I do make the edit, I'll be sure to post what i make though.
 

digitalslacker

Senior Member
Sep 22, 2010
59
6
Arnold, MD
Widgetsoid has a volume adjuster that I use, though more often I just use headphones with volume sliders built in, so I skip using the software entirely. Ideally, I would love to be able to mod the framework to add a quick volume adjust button to the status bar like the softkeys, however that involves code editing that I just haven't dug into yet. If I do make the edit, I'll be sure to post what i make though.

thanks, i'll check it out.
 

xyexz

Senior Member
Feb 19, 2008
58
0
What would be really cool and I'm not sure it's possible and I know it's not in the scope of this thread; but a way to change functionality of the buttons per app. So for example when in Pandora (or music app of choice) buttons behave as volume buttons, but under other various apps like gallery it could be home+back button set.
Seems like you'd have to have an app running as a service and monitor the currently running focused app (not in sleep mode) and depending on what has focus do a live update to the qwerty.kl file to change buttons to expected functionality, not sure if a reboot is required after an update to the kl file though?
 

spikey911

Senior Member
Jan 14, 2008
316
11
How can you revert back to stock?

Also is there a way to swap the keys? It seems more natural to have the back key as the +

Thanks for your work, installed without a hitch..
 
Last edited:

WhiskeySlx

Senior Member
Jan 12, 2010
51
8
How can you revert back to stock?

Also is there a way to swap the keys? It seems more natural to have the back key as the +

Thanks for your work, installed without a hitch..

change mapping in step 4 from here:

http://nookdevs.com/NookColor_Remap_volume_buttons_for_back_and_menu

  1. adb pull /system/usr/keylayout/TWL4030_Keypad.kl
  2. adb pull /system/usr/keylayout/omap_twl4030keypad.kl
  3. edit 'TWL4030_Keypad.kl' and 'omap_twl4030keypad.kl' with a unix line ending aware text editor (Notepad++, gedit, vi)
  4. replace 'VOLUME_DOWN' with 'BACK' and replace 'VOLUME_UP' with 'MENU' in each (or vice-versa)
  5. adb shell
  6. mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
  7. exit
  8. adb push TWL4030_Keypad.kl /system/usr/keylayout/TWL4030_Keypad.kl
  9. adb push omap_twl4030keypad.kl /system/usr/keylayout/omap_twl4030keypad.kl
  10. adb shell
  11. cd /system/usr/keylayout
  12. chmod 644 omap_twl4030keypad.kl
  13. chmod 644 TWL4030_Keypad.kl
  14. exit
  15. adb reboot
 

bigted41

Member
Dec 24, 2010
30
3
my status bar always shows with HoneyComb, so I always have the back menu buttons. are there apps where this is not the case?
 

EpicFail236

Retired Recognized Developer
Jun 5, 2008
98
28
San Francisco
not working with
[ZIP][DEV][ROM] HC v4 eMMC 2nd ed. - Flashable ZIP {02/21/11}

buttons still remain in their normal functionality...

Yeah, I totally deleted an extra file, added to v5 and it should now work with this eMMC build. oops.


How can you revert back to stock?

Also is there a way to swap the keys? It seems more natural to have the back key as the +

I will have to put together a stock zip and put it up sometime in the near future. Your swap keys is not easily done directly, but I have posted a new flashable zip that will swap the keys, flash INV-v5 to have the volup function as back and voldown to work as menu. This one I haven't tested, as I don't actually have my nook with me here now, but in theory it should be OK, as all I did was swap the mappings in the kl files.
 

rickpref

Senior Member
Aug 5, 2010
135
12
After setting up CM7 Nightly 4 last night I replaced the SDcard with CWM 3.0.0.6 used to install CM7 with a fat32 8gb for storage.

Afterwards I installed ROM Manager and the latest Recovery included - 3.0.0.5.

I am able to flash Dalingrin's latest kernel through here but when I went to flash todays Nightly CM7 it did not work (probably because of the 3.0.0.5 i figured). I plugged back in the 1GB SD with 3.0.0.6 and successfully flashed todays nightly.

I then tried to flash the Hard Key Mod file using the emmc recovery and it did not work so I copied it to my 1GB SD and that worked.

Anyways...I wrote this just in case someone was having the same problem I had flashing the Hard Key Mod file and to see if there is any method to set up 3.0.0.6 on the emmc so that I don't have to insert the 1GB SD every time I wanna flash CM7 nightlies.
 

EpicFail236

Retired Recognized Developer
Jun 5, 2008
98
28
San Francisco
After setting up CM7 Nightly 4 last night I replaced the SDcard with CWM 3.0.0.6 used to install CM7 with a fat32 8gb for storage.

Afterwards I installed ROM Manager and the latest Recovery included - 3.0.0.5.

I am able to flash Dalingrin's latest kernel through here but when I went to flash todays Nightly CM7 it did not work (probably because of the 3.0.0.5 i figured). I plugged back in the 1GB SD with 3.0.0.6 and successfully flashed todays nightly.

I then tried to flash the Hard Key Mod file using the emmc recovery and it did not work so I copied it to my 1GB SD and that worked.

Anyways...I wrote this just in case someone was having the same problem I had flashing the Hard Key Mod file and to see if there is any method to set up 3.0.0.6 on the emmc so that I don't have to insert the 1GB SD every time I wanna flash CM7 nightlies.

My assumption (it may be wrong, as I do not have my nook present with me to confirm) is that the system partition on the CM7 builds is ext4, and as a result, 3.0.0.5 would not be able to access it to flash any data. flashing either the cm7 nightlies or my additions, both of which write to this ext4 partition, needs to be done via 3.0.0.6.

That being said. I personally managed to get 3.0.0.6 to work on my emmc by taking the uImage and uRamdisk from the SD card version, renaming them uRecRam and uRecImg, and copying them to the eMMC boot parition. I would not recommend doing this without knowing *Exactly* what you are doing, as overriding these files with other files could cause bad things to happen, and as I said above, bad things are bad.
 
Last edited:

rickpref

Senior Member
Aug 5, 2010
135
12
My assumption (it may be wrong, as I do not have my nook present with me to confirm) is that the system partition on the CM7 builds is ext4, and as a result, 3.0.0.5 would not be able to access it to flash any data. flashing either the cm7 nightlies or my additions, both of which write to this ext4 partition, needs to be done via 3.0.0.6.

That being said. I personally managed to get 3.0.0.6 to work on my emmc by taking the uImage and uRamdisk from the SD card version, renaming them uRecRam and uRecImg, and copying them to the eMMC boot parition. I would not recommend doing this without knowing *Exactly* what you are doing, as overriding these files with other files could cause bad things to happen, and as I said above, bad things are bad.

Yeah, I figured it had to be that EXT4 partitions are not compatible with 3.0.0.5 but it took me a while to get it. So I take it you need to use ADB in order to rename and copy to boot those files?
 

EpicFail236

Retired Recognized Developer
Jun 5, 2008
98
28
San Francisco
Yeah, I figured it had to be that EXT4 partitions are not compatible with 3.0.0.5 but it took me a while to get it. So I take it you need to use ADB in order to rename and copy to boot those files?

My ADB machine was down and out at the time, so I had to do it via ES file manager and the terminal on the nook itself, but yeah, manual replacement was the way to go. sometimes a bit of command-fu is just easier than the alternative.
 

RoboRay

Senior Member
Nov 25, 2010
544
50
Question though, what do you all use for a good alternative to adjust the volume on the fly?
Is there a preferred widget? Right now i just have a ADW shortcut to the sound settings on the home screen.

I use Volume Widget by Futon Redemption. It gives you two little onscreen +/- buttons to adjust the volume.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Hey everybody!

    ***New APK editor added! Set the keys to whatever you want, see below!***

    ****I will not be held responsible if your Nook Color starts eating babies!!****

    ****Or if it breaks either!!****

    ****Added a revert, for those who may have issues returning the keylayout to stock (like 1.1 users who can't run the keylayout app)****

    ****As an added request, if anyone knows how to reload the keylayouts sans reboot, please let me know, as that is really the only thing missing from this little thing. I would love to be able to quickly reload these as needed.****

    So after creating the flashable zip file for the keylayouts, and receiving some feedback that implied it would be nice to have more options, I decided to brush up on the coding skills and write a nice little app that can re-write the keylayout files without having to flash anything. This is actually my first android app, so please provide me with any feedback you may have, the more the better. The way I see it, the more I know, the better things I can make.

    The keylayout app currently supports mapping the volume keys to these items:

    Volume Up
    Volume Down
    Menu
    Back
    Search
    D-pad Center

    and can additionally support wake on press, if desired. Once written, you will need to reboot your device for the keylayout to be effective, but it's still easier than manual edits or multiple flashes.

    ***Note that using the app requires su access, and also at this point requires that you first flash one of my v5 keylayout zip files***

    ***I have received notice that the application does not run on stock rooted 1.1.0 I will be looking into this and posting an update, and most likely a revert to stock zip in case anyone needs it.***

    Thanks go to whoever first suggested this, I'll be damned if I can't remember who I got this from, but thank you, whoever you are, I'll be sure to give you props when I figure out who you are. :)

    History over, now for the details:


    To install: Simply flash either zip file in CWM after flashing your CM7 or Honeycomb build to your eMMC. Once you do this, you can install and use the apk file to make changes to the keylayouts to your heart's content.


    The CWM zips have been confirmed to work on most all versions of android for the nook, and in theory, the APK should work as well, however YMMV. If it works, or if it doesn't, please please post your version or build info, and let us all know what works and what doesn't.

    Feedback and/or critiques accepted, may be subject to rebuttal. Hope this helps someone else, and thanks to everyone on this forum for all the hard work you do!


    FYI: For those who still want an easy way to change the volume when these keys are no longer volume keys, try replacing the longpress home app with Recent Plus, by local forum contributor timoskrempel, which I first found HERE and works very well as a replacement.

    Version History
    -----------------------
    apkv0.1b - Initial version of the keylayout app. Feedback appreciated.

    v5: added files that apparently weren't as useless as I assumed. Also created inverted keys zip, use INV zip to switch the buttons.

    v4: removed useless files from update zip, cause I'm being a bit too perfectionist.

    V3: added files to improve compatibility (HC v4 tested, should work on Froyo, maybe stock)

    V2: removed wake on press (thanks jasoraso)

    V1: First Version
    2
    I definitely prefer hard keys, even with the modifications in CM7. I'll give your zip a try next time I flash a rom (I've already changed my qwerty.kl on this rom).

    One other thing - I also prefer to remove the "wake" for those 2 keys, I found that the NC was accidentally waking up from inadvertent keypresses on the volume keys ...
    1
    not working with
    [ZIP][DEV][ROM] HC v4 eMMC 2nd ed. - Flashable ZIP {02/21/11}

    buttons still remain in their normal functionality...
    1
    long press option for hard-keys editor

    Thanks for this great app! It would definitely help make the NC more user friendly.

    This reminds me of the pandigital novel,which like the NC it has no menu or back button -- not even the "N" home button! The developers there found a way to remap the volume buttons; that in turn was refined so that you have two options for each volume key, depending on whether or not you just tap or long-press the volume key. I wonder if something like that could be done here? Here's the link (see post #1, in particular the 10/2 and 10/31 updates):

    http://www.slatedroid.com/index.php...ware/page__p__56065__fromsearch__1#entry56065

    NOTE: The attached apk there does a lot more then just volume key hacks; it generates an auto-hide status bar that get activated if you tap the upper lower corner of the screen.

    THANKS!