Jump to content

Can I disable the volume buttons?


Recommended Posts

Guest womble_sanfran
Posted

I keep accidentally pressing the volume buttons when playing with my phone, I would love to be able to disable the buttons as I am very happy to change the ringer volume through 'settings'. Is there an app that can do this for me?

I also use Tasker to set it to silent at night or when I am at work so I dont want anything that would interfere with that.

Thanks,

Womble

Guest womble_sanfran
Posted

Anyone?

I have done a lot of googling and there are apps that can be set to make you confirm any volume changes but this applies to ANY volume changes, not just those done with the buttons on the side of the phone, this would conflict with my tasker profiles I have setup to change volume during the day. Suely there must be a way to just disable the side buttons? Can I edit the key mappings?

Thanks

Guest Frankish
Posted

Look for a keypad.kl file.

key 115 VOLUME_UP WAKE

key 114 VOLUME_DOWN WAKE

Remove both WAKE lines...leave blank.

key 115 VOLUME_UP

key 114 VOLUME_DOWN

So i tlooks like above. See what happens? I haven't tested it.

File may be in system/usr/keylayout

Guest Frankish
Posted

Look for a keypad.kl file.

key 115 VOLUME_UP WAKE

key 114 VOLUME_DOWN WAKE

Remove both WAKE lines...leave blank.

key 115 VOLUME_UP

key 114 VOLUME_DOWN

So i tlooks like above. See what happens? I haven't tested it.

File may be in system/usr/keylayout

Guest womble_sanfran
Posted
Look for a keypad.kl file.

key 115 VOLUME_UP WAKE

key 114 VOLUME_DOWN WAKE

Remove both WAKE lines...leave blank.

key 115 VOLUME_UP

key 114 VOLUME_DOWN

So i tlooks like above. See what happens? I haven't tested it.

File may be in system/usr/keylayout

I presume I would need to root the phone to access this file? I am currently on the stock orange rom.

Guest Frankish
Posted

Oh yeah sorry. I always assume people on here are rooted. Sorry about that.

Guest womble_sanfran
Posted
Oh yeah sorry. I always assume people on here are rooted. Sorry about that.

I am rooted now but I still dont have permission to edit the blade_keypad.kl file. I even mounted /system as r/w and still couldnt edit the file. How do I edit this file?

Thanks

Guest kallt_kaffe
Posted

First do this...

$ su

# cat /system/usr/keylayout/blade_keypad.kl > /sdcard/blade_keypad.kl

Then edit it on your computer (keep a backup) with an editor that respects the unix linebreaks (Google crimson editor).

Remove the volume button mappings completely and save.

Back on the phone do this:

$ su

# mount -t yaffs2 -o rw,remount /dev/block/mtdblock5 /system

# cat /sdcard/blade_keypad.bl > /system/usr/keylayout/blade_keypad.kl

# reboot

Btw, it's possible that /system is allready mounted in read-write. The french ROM was set up as read-write by default B)

Guest womble_sanfran
Posted (edited)
First do this...

$ su

# cat /system/usr/keylayout/blade_keypad.kl > /sdcard/blade_keypad.kl

Then edit it on your computer (keep a backup) with an editor that respects the unix linebreaks (Google crimson editor).

Remove the volume button mappings completely and save.

Back on the phone do this:

$ su

# mount -t yaffs2 -o rw,remount /dev/block/mtdblock5 /system

# cat /sdcard/blade_keypad.kl > /system/usr/keylayout/blade_keypad.kl

# reboot

Btw, it's possible that /system is allready mounted in read-write. The french ROM was set up as read-write by default B)

Thanks for that, will try it later. I am a newb to this.

EDIT: I have now done it and just removing the WAKE_DROPPED from the ends of the VOLUME_UP and VOLUME_DOWN lines didnt work but removing the entire line for each did the trick. My volume keys now do absolutely nothing and I can change the volume using 'settings'.

There was a typo in the code from kallt_kaffe which I have corrected in the quote above.

Thanks for the tips

Edited by womble_sanfran
Guest womble_sanfran
Posted (edited)

Just one further question, now I am done I want to set everything back. How do I make /system read-only again? I tried this:

mount -t yaffs2 -o ro,remount /dev/block/mtdblock5 /system

It didnt seem to work as I turned the phone off and on again and when I type mount in the terminal emulator I get this:

/dev/block/mtdblock5 /system yaffs2 rw 0 0

Any ideas how I fix this as what I seem to do doesnt survive turning the phone off and then on again.

Thanks

Edited by womble_sanfran

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.