[One (M7) Q&A, Help & Troubleshooting] iKoyy:
Wake on volume keys research

Tried many of those apps using the proximity sensor to turn on the screen. I reall hate them because :

1- None of them would have a very high accuracy. Mostly due to the sensors on most of the phones beeing not very accurate to detect multiple wave in a short time frame. It's not their initial purpose anyway.

2- The sensor is at the far top left of the screen which does not help in any way to use turn on the screen with one hand.

3- The fact that you have to swipe 2 or 3 times in front of the sensors which are not very accurate makes it equal in time if not longer than using your 2nd hand to reach the power button.

I believe these apps are not that useful and would prefer something to wake the screen with volume keys or tactile keys at the button.

For the moment I use an app called Flip Flap which is working pretty well. You jsut have to do a quick shake like if you suddenly had to take a look at your wrist watch while holding your phone. It's a half second movement and it unlocks/locks your screen with a movement that you will not trigger by accident so it's kinda nice and quick.

But still, it's not as good as volume keys which are perfectly placed to turn on the thing.

So my phone is rooted now and I've looked into a few things.

I've read that the file handling the keymapping would be in there : /System/Usr/Keylayout and the file to be modified would be l0-keypad.kl

Unfortunately the file is simply not existing on my phone. (Maybe it's got something to do with the fact I do not use the original Android keyboard but Swiftkey instead ? Dunno.

So here is the full list of file I've got in this /System/Usr/Keylayout :

Sorry guys you'll have to enter the h before my links to see them as I don't have 10 posts and can't use external links yet

ttp://i.imgur.com/wkPts92s.png and ttp://i.imgur.com/Ab5sI3Rs.png

Unfortunately I can't find eaxctly which one is used by the phone to map the volume keys exactly.I tried to modify the Generic.kl file :

ttp://pastebin.com/0JdTHwsy

Lines 136 and 137 seems to be mapping the volume keys :

key 113 VOLUME_MUTE

key 114 VOLUME_DOWN

I have tried to add "WAKE" in the same way it is written for the POWER key : key 116 POWER WAKE

Saved the file, restarted the phone but then the file was reset to its intial value so I don't think we can modify this one.

Then I checked another folder : /sys/keyboard/

This one contains a file named vol_wakeup. Was pretty happy to find that one.

It only contains a single character : "0"

The most obvious thing was to try and replace that 0 by a 1 to enable the option but same thing as last time. After saving and restarting the phone this file was restored to its inital value with the 0 in it.

At this point I simply don't have the knowledge to go further. Blocking points :

- I don't know if physical keys like volume are mapped in a generic keyboard file or in a file specific to the virtual keyboard the user has chosen (Android default keyboard or Swiftkey or any other...). This would mean editing different files after identifying them.

- I don't know why the files I've tried to modify went back to their initial states. My phone is rooted, I used ES Explorer to get to the root folder and ES Notepad to edit them and save. I had no error message on saving so I don't think it's got anything to do with access rights.

Could use anyone's help :)