Lock the device on longpress vol down - HTC One S

Hi all
I made some searches but didn't find any answer, hope some of you could help me.
I want to edit the system/usr/keylayout/device-keypad.kl to make my device go to sleep when screen on & longpress vol down.
Here is the original file content :
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
In fact, I don't know the keycode and keyevent name of a vol down longpress.
Can someone know this ? Or at least how to get it ? (Already tried KeyCode Display but it doesn't work as expected).
NB : I already tried Xposed Additions module, and it made the job quite well (device goes to sleep when longpress the right key), but all other keys seems to be messed up (double vibrate, sometimes some keys doesn't even work) so I decided not to use this module anymore and make it manually by editing the right file.
Thx for reading

Related

Side button (volume) unlock screen

Currently I`m using WidgetLocker to unlock screen with volume but I lost default unlock screen from sense who is beautifull so:
WidgetLocker Lockscreen can do it, CM7 rom I heard that can do it so how can they do it? What should us (I`m sure that I`m not the only one who don`t want to use power button to unlock screen or to use some app that keep sensors on) have to do to unlock screen with volume keys? I tried to edit keypad.kl (key 114 VOLUME_DOWN WAKE to WAKE_DROPPED) but on desire S has no effect so if widget locker/cm7 can do this thing maybe someone can help and say what should I have to edit ?
update: after using ButtonRemapper v0.2.4.1:
1.volume +- with wake_dropped = didn`t worked to unlock screen.
2.volume +- binded as power and wake_dropped = when screen was on it worked to make screen off but when screen was off didn`t worked to unlock.
out of ideas :|
Bump
I'm bumping this one.
Yes there are more people who want to use their volume key(s) to unlock to their Sense 3 based lockscreen!
Hope that somebody can come up with an answer!
I'm keeping my eyes on this post.
Cheers,
D.
codryn said:
update: after using ButtonRemapper v0.2.4.1:
1.volume +- with wake_dropped = didn`t worked to unlock screen.
2.volume +- binded as power and wake_dropped = when screen was on it worked to make screen off but when screen was off didn`t worked to unlock.
out of ideas :|
Click to expand...
Click to collapse
i got this working on my htc evo today, here are my changes i made using Button Remapper v0.2.4.1
107 [Endcall] Endcall W_D
116 [Power] Volume Up W
115 [Volume Up] Volume Down W
114 [Volume Down] Power W_D
217 [Search] Search W_D
158 [Back] Back W_D
139 [Menu] Menu W_D
102 [Home] Home W_D
so now my power button is vol up, vol up is vol down, and vol down is power.
im not sure if this will work on your phone, but i dont get to help people much and this felt right up my alley
EDIT: also, i used to use widgetlocker with a sense theme, so you should be able to change it in the custom slider screen, check under themes.
Look HERE for info how to do it.

Xperia J remap volume down button root

Hi,
I was not happy with the small power button, so I took the idea described here for miro device: http://forum.xda-developers.com/showthread.php?p=35801737
and I changed in fih_gpio-keys.kl:
key 114 VOLUME_DOWN WAKE
to:
key 114 SEARCH WAKE_DROPPED
Now volume down key works as search button - so I can unlock device by pressing volume down, and use it as a fast search to Google. I also downloaded LaunchKey
http://forum.xda-developers.com/showthread.php?t=818499
So long press on Volume down will bring me to camera360 app. for photo.
I do not use volume down so often and If I want to set volume down, I just press volume up and on screen I set the level..
(also the value can be change to: key 114 POWER WAKE - after that it works as the power button - but not for the complete power up after shut down... )
So this tip can be useful for anybody, who wish to have another way to unlock Xperia J (I was not happy with the unlock app. on Google play, as they always somehow messed with my lock screen)
Changed minc VOL(-) liked it !
jozka said:
Hi,
So long press on Volume down will bring me to camera360 app. for photo.
Click to expand...
Click to collapse
change mine keylayout and installed LaunchKey.
Useful combo for Xperia J ,since it lacks SEARCH key +1

[Q] Galaxy S2 Power Button Failure

My sprint epic power button failed and I am trying to fix it by moving the function of the power key to the volume up or down key and setting the power key function to null. I have several questions on how to do this.
1. I know that I will have to gain root access but is there a way to do this without installing a custom kernel?
2. If i do end up having to root hte thing how do I get into download mode if the power key is not working?
3. My current /system/usr/keylayout/ has several files in it and am I right to assume that I should be editing the gpio-keys.kl file?
4. Is the 116 button assigned the power button value and 115 volume up?
5. Currently the file looks like this
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 116 POWER WAKE
so if i edited it to something like
key 115 POWER WAKE
key 114 VOLUME_DOWN WAKE
key 116
would it still work? I want to leave the power key funciton blank as it looks like it is stuck and I dont want it to get stuck performing volume up the whole time.
That is all. Any help would be extremely appreciated by me and as you can see I am new to this whole process so if you have any pointers or better ways of doing this I would be extremely grateful for any input.
Bump
Bump
sacaAf unto
Any suggestions would def help

[Q] Need to know screen manufacturer and get drivers for other stuff

Ok I might sound like a noob here (which I am ) but I need to know the manufacturer of the screen and obtain drivers for it.
Why I need it?
We are trying to build a custom kernel and actually we got some success. But following are the bugs:
screen doesn't turn off after locking
camera doesn't work.. just a black screen
usb doen't work
touch sensitive buttons don't work except home button which now works as back button!
volume down button has now become volume up button.. and volume up button doesn't work...
What is the device name?
It is Karbonn A18/Neobox tuan 4.3 with MT6575 chipset and MT6620 combo chip.
--------
Can anyone please help? We are just two people working on this and looking for someone who can help us out.
Thanks in advance!
CHANGING HARD KEY FUNCTION (REMAPPING BUTTON)
Quote:
1. open /system/usr/keylayout/[phone model]-keypad.kl with notepad++
(Some phone may have different names, but it will always end with "keypad.kl)
it will look like this --
HERE YOU WILL FIND 3 ROWS...
Quote:
1. As you can see, there are different attributes assigned to each key. like this
Code:
key 102 HOME
key 139 MENU
key 158 BACK
key 115 VOLUME_UP
key 114 VOLUME_DOWN
2. Specific application/action launchers:
Code:
HOME #Launches "Home"
MENU #Launches "Menu"
BACK #Takes you back to the last activity
SEARCH #Launches "Universal Search"
CALL #Launches the "Phone" activity and corresponding .apk or initiates a call
ENDCALL #Ends a call
CAMERA #Launches "Camera" activity and corresponding .apk
FOCUS #Initiates Auto-Focus while using the Camera
VOLUME_UP #Self explanatory
VOLUME_DOWN #Self explanatory
3. And attributes saying if it should wake the phone at button push to complete the action, or if it should just complete the action without waking the screen.
Code:
WAKE #Completes the action without waking the screen
WAKE_DROPPED #Wakes the phone to complete the action
2. NOW WE WILL EDIT SECOND AND/OR THIRD ROW
Erase the center row value for any key to completely disable it. To reassign the key, replace the center row value with another one from the same row. Change the right row value to either "WAKE" or blank to enable the wake function. Do not modify the left row.
NOTE: don't edit left row i.e. first row which contains specific key identity number.
FOR EXAMPLE I DO THESE CHANGES
DEFAULT VALUES ---
Code:
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
CHANGED VALUES ---
Code:
key 115 CAMERA WAKE
key 114 FOCUS WAKE
NOW VOLUME UP KEY WILL WORK AS CAMERA KEY AND VOLUME DOWN KEY WILL WORK AS FOCUS KEY....
NOTE: all words should be in BOLD letters i.e. capital letters...
Hello,
My phone model is CCE SM70 in brazil, same as Karboon A18 and NEOBOX TUNA, i would like to know how you compiled the kernel for this device. You compiled the philips w732 from forum.china-iphone.ru with default kernel config for mt6575?
Thanks in advance,
Tiago

[Q] Enable volume keys to wake device?

Could someone assist me in enabling the volume keys to wake the screen?
I have root access and tried this method:
Install Root Explorer (only one I advise for this).
Root.
Go into \system\usr\keylayout
Edit generic.kl and gpio-keys.kl (I recommend taking backups first).
Find key 115 and 114 in both files.
Remap as you wish. I have mine set to Menu and Home.
Save and reboot.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2484185
And I changed
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
in both files and rebooted.
But it did not work. I noticed this while I was searching: https://github.com/SomethingExplosi...mmit/d18879528bc4de75d03620ee7636acd404bfcdf9
Does WAKE_DROPPED mean anything?
Edit: WAKE_DROPPED apparent means to turn the screen on and forget the keypress.
What's odd is that many of the keylayout .kl files already have VOLUME_UP WAKE already...

Categories

Resources