Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,588 Members 45,425 Now Online
XDA Developers Android and Mobile Development Forum

Deactivate volume buttons possible?

Tip us?
 
lordofazeroth
Old
#1  
Senior Member - OP
Thanks Meter 22
Posts: 503
Join Date: Nov 2010
Default Deactivate volume buttons possible?

I gave the Galaxy Nexus to my father. Everytime he takes it out of the leatherbag he accidentally touches the volume keys.
Is there a way to deactivate the volume keys, so the ringer cannot be changed, but the volume when phoning can be changed?
Rubik ROM with Rubik Apps and Rubik kernel r24
 
mugna91
Old
(Last edited by mugna91; 28th July 2014 at 02:04 AM.)
#2  
Junior Member
Thanks Meter 22
Posts: 20
Join Date: Jan 2012
If you have root privileges just edit /system/usr/keylayout/tuna-gpio-keypad.kl.
key 114 UNKNOWN
key 115 UNKNOWN
Backup the file before.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
 
isajoo
Old
#3  
isajoo's Avatar
Senior Member
Thanks Meter 51
Posts: 216
Join Date: Oct 2012
Installing gravitybox via exposed add-on will give you full control over the volume buttons + more.

Eg.
Set it to only change media volume by default.

Remove annoying beeping sound when pressing volume buttons.

Expanded on screen volume controls for ringer/media/notification/alarm/in-call.
 
AGoogleUser
Old
#4  
AGoogleUser's Avatar
Senior Member
Thanks Meter 29
Posts: 226
Join Date: Dec 2012
Location: Harmony
Quote:
Originally Posted by mugna91 View Post
If you have root privileges just edit /system/usr/keylayout/tuna-gpio-keypad.kl.
key 114 VOLUME_DOWN UNKNOWN
key 115 VOLUME_UP UNKNOWN
Backup the file before.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
You might be able to help me sir.

Is there a way to map these hardware keys to preform different actions? If possible I'd like the power button to go to the home screen.

Sent from my Liquid Powered Nexus!
 
mugna91
Old
#5  
Junior Member
Thanks Meter 22
Posts: 20
Join Date: Jan 2012
Quote:
Originally Posted by AGoogleUser View Post
You might be able to help me sir.

Is there a way to map these hardware keys to preform different actions? If possible I'd like the power button to go to the home screen.

Sent from my Liquid Powered Nexus!
Yep. Just check Generic.kl (same folder) for a full list of commands. In your case:


key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 116 HOME

PS I have edited my previous message.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
The Following User Says Thank You to mugna91 For This Useful Post: [ Click to Expand ]
 
AGoogleUser
Old
#6  
AGoogleUser's Avatar
Senior Member
Thanks Meter 29
Posts: 226
Join Date: Dec 2012
Location: Harmony
Quote:
Originally Posted by mugna91 View Post
Yep. Just check Generic.kl (same folder) for a full list of commands. In your case:


key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 116 HOME

PS I have edited my previous message.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
Setting key 116 to HOME didn't work. After a reboot my power button just didn't do anything. Even long holding didn't make the power off screen open. I reverted and it works fine again.

Sent from my Galaxy Nexus using XDA Free mobile app
 
mugna91
Old
(Last edited by mugna91; 28th July 2014 at 07:43 PM.)
#7  
Junior Member
Thanks Meter 22
Posts: 20
Join Date: Jan 2012
Quote:
Originally Posted by AGoogleUser View Post
Setting key 116 to HOME didn't work. After a reboot my power button just didn't do anything. Even long holding didn't make the power off screen open. I reverted and it works fine again.

Sent from my Galaxy Nexus using XDA Free mobile app
Here is working. Make sure you have deleted WAKE. The string it's just:
key 116 HOME
EDIT: Try this http://d-h.st/xFp

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
 
AGoogleUser
Old
#8  
AGoogleUser's Avatar
Senior Member
Thanks Meter 29
Posts: 226
Join Date: Dec 2012
Location: Harmony
Quote:
Originally Posted by mugna91 View Post
Here is working. Make sure you have deleted WAKE. The string it's just:
key 116 HOME
EDIT: Try this http://d-h.st/xFp

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
Still not working. Will try with different launcher and will report back.

Sent from my Galaxy Nexus using XDA Free mobile app

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Real-World Battery Saving Tips for Android – XDA Developer TV

You need Real-World Battery Saving Tips for your Android device. Our … more

Android L Will Have Data Encryption Turned On by Default

Android L, once it is eventually released, will featuredata encryption turned on by … more

Lock Apps and Functions Easily with Droid Protector

Access and security are some of the key issues facingmobile technology. Whether … more

ARChon Lets You Run Android Apps in Google Chrome Browser

Not too long ago, Google added the ability torun select Android applications on … more