Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,027 Members 49,009 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: Do you like having physical Menu and Back Keys
Yessir! 190 88.79%
No sir, I don't like it! 24 11.21%
Voters: 214. You may not vote on this poll

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

Tip us?
 
EpicFail236
Old
(Last edited by EpicFail236; 25th March 2011 at 12:27 AM.) Reason: added APK file!
#1  
EpicFail236's Avatar
Retired Recognized Developer - OP
Thanks Meter 27
Posts: 97
Join Date: Jun 2008
Location: San Francisco
Talking [ALL][CWM][APK]Hard-Keys editor app! (Volume keys to whatever you want!)

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
Attached Files
File Type: zip Keysmod-CM7-HC-v5.zip - [Click for QR Code] (204.6 KB, 2617 views)
File Type: zip Keysmod-CM7-HC-INV-v5.zip - [Click for QR Code] (204.6 KB, 685 views)
File Type: apk NookKeyEditor-0.1b.apk - [Click for QR Code] (20.3 KB, 1759 views)
File Type: zip Keysmod-revert.zip - [Click for QR Code] (195.1 KB, 521 views)
T-Mobile (10 yr customer)

Moto Defy+ -- 16GB sd, CM7.2 (really just a modem at this point)
Nexus 7 - 32GB (My daily driver)

NookColor --Repurposed (Mounted Kitchen Appliance!)
HTC HD2 -- Transferred to the wife for test work

HTC Flyer -- RETIRED (Use pending)
G1 white -- RETIRED (held for emergencies)


My contributions to this insanity:

App to set your Nook's volume buttons to be menu, back, and more!
The Following 18 Users Say Thank You to EpicFail236 For This Useful Post: [ Click to Expand ]
 
jasoraso
Old
#2  
Senior Member
Thanks Meter 127
Posts: 447
Join Date: May 2007
Location: 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 ...
The Following 2 Users Say Thank You to jasoraso For This Useful Post: [ Click to Expand ]
 
EpicFail236
Old
#3  
EpicFail236's Avatar
Retired Recognized Developer - OP
Thanks Meter 27
Posts: 97
Join Date: Jun 2008
Location: San Francisco
Quote:
Originally Posted by jasoraso View Post
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 ...
An excellent point. Editing my zip and attaching v2. thanks to you!
T-Mobile (10 yr customer)

Moto Defy+ -- 16GB sd, CM7.2 (really just a modem at this point)
Nexus 7 - 32GB (My daily driver)

NookColor --Repurposed (Mounted Kitchen Appliance!)
HTC HD2 -- Transferred to the wife for test work

HTC Flyer -- RETIRED (Use pending)
G1 white -- RETIRED (held for emergencies)


My contributions to this insanity:

App to set your Nook's volume buttons to be menu, back, and more!
 
chemical1der
Old
#4  
chemical1der's Avatar
Senior Member
Thanks Meter 16
Posts: 154
Join Date: Sep 2008
Location: Iron
success! just flashed this along with nightly#4 and it works like a charm.
 
digitalslacker
Old
#5  
digitalslacker's Avatar
Member
Thanks Meter 5
Posts: 59
Join Date: Sep 2010
Location: Arnold, MD

 
DONATE TO ME
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
Old
#6  
EpicFail236's Avatar
Retired Recognized Developer - OP
Thanks Meter 27
Posts: 97
Join Date: Jun 2008
Location: San Francisco
Quote:
Originally Posted by digitalslacker View Post
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.
T-Mobile (10 yr customer)

Moto Defy+ -- 16GB sd, CM7.2 (really just a modem at this point)
Nexus 7 - 32GB (My daily driver)

NookColor --Repurposed (Mounted Kitchen Appliance!)
HTC HD2 -- Transferred to the wife for test work

HTC Flyer -- RETIRED (Use pending)
G1 white -- RETIRED (held for emergencies)


My contributions to this insanity:

App to set your Nook's volume buttons to be menu, back, and more!
 
digitalslacker
Old
#7  
digitalslacker's Avatar
Member
Thanks Meter 5
Posts: 59
Join Date: Sep 2010
Location: Arnold, MD

 
DONATE TO ME
Quote:
Originally Posted by EpicFail236 View Post
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
Old
#8  
Member
Thanks Meter 0
Posts: 58
Join Date: Feb 2008
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
Old
(Last edited by spikey911; 23rd February 2011 at 08:36 AM.)
#9  
Senior Member
Thanks Meter 10
Posts: 302
Join Date: Jan 2008
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..
 
WhiskeySlx
Old
#10  
WhiskeySlx's Avatar
Member
Thanks Meter 8
Posts: 50
Join Date: Jan 2010
Quote:
Originally Posted by spikey911 View Post
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_..._back_and_menu

Quote:
  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

Tags
cm7 keys menu
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes