Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,471 Members 40,298 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] - Sleep Mods to compliment Trackpad Wake Mod *UPDATED Sense/Vanilla versions

Tip us?
 
the1wingedangel
Old
(Last edited by the1wingedangel; 18th January 2011 at 02:23 PM.)
#1  
the1wingedangel's Avatar
Member - OP
Thanks Meter 46
Posts: 93
Join Date: Feb 2009

 
DONATE TO ME
Default [MOD] - Sleep Mods to compliment Trackpad Wake Mod *UPDATED Sense/Vanilla versions

[Info]:
My only gripe about the trackpad wake mod (while it is awesome), is that we do it in order to avoid reaching for the awkwardly placed power button, but then we still have to reach for it anyway when we want to shut the screen back off. So it only helps us for half of the task.

After trying to find a way to directly map the search soft-key (or any of the soft-keys) to a power button, and failing, I've decided to come at it from a different angle. Attached you'll find a very simple app, that simply turns off the screen when clicked, along with instructions on how to map it to the search soft-key or the rosie button for sense users.

[Options]:
1. Search key short press. This is the method I use, as it is both the fastest and accessible from within any app. It will completely replace the search key. Single-tap it at anytime to turn off the screen. You'll need to install the app, and push the keyboard remapping file that I have also attached. Note that there are 2 different key mapping files, one for Sense ROMs and another for Vanilla. They will make the following changes:
Sense version:
-Search soft-key is now mapped to the user programmable key #2. Set it to open the Kill Screen app.
-www/com key is now TAB.
-USER 3 key, which didn't work anyway, is now BACK.
-USER 2 key, which is now not needed, is HOME.
-USER 1 key (left of the space bar) is left as normal.
Vanilla version:
-Search soft-key is now mapped to the user programmable key #3. Set it to open the Kill Screen app.
-USER 3 key, which is now not needed, is now BACK.
-USER 1 and USER 2 are left as normal.
2. Rosie's right button. This is for those who want to keep the search key as normal. See my rosie remap thread here for the option to have it launch when you press the right dock button. Keep in mind you still need to install the app, and you'll (obviously) have to be viewing one of the home screens to press it.

NOTICE: Do not post asking me to adapt this key layout to your needs, as we will end up with 500 different files before long. Instead, change it yourself! Editing this file is about as easy as it gets. You don't need anything special installed, or any programing experience whatsoever. Simply open the attached (or your own) vision-keypad.kl in any text editor (Notepad, Notepad++, etc) and change your desired key to your desired function. If you want to know what key corresponds to what number, you can boot to clockworkmod recovery --> advanced --> key test. Touch any key on the phone, and it spits out the number.

NOTICE #2: As with any app that is given administrator permissions, you will need to remove the app from the admin list in order to uninstall it. Menu --> Settings --> Security --> Select Device Administrators --> Uncheck Kill Screen. Then uninstall as normal. You will be reminded to do this when you first give the app the admin permissions.

[How To]:
Method 1 - Install the app, then grab a copy of the modified key layout and then reboot to recovery and enter this code:
adb shell mount /system
adb shell rm /system/usr/keylayout/vision-keypad.kl
adb push [your saved file location]\keypad_owamod_xxxxx.kl.zip /system/usr/keylayout/vision-keypad.kl
Reboot and enjoy.
Method 2 - Install the app first, then see the linked thread for how to get the modified rosie.apk
Attached Files
File Type: apk KillScreen.apk - [Click for QR Code] (24.4 KB, 274 views)
File Type: zip keypad_owamod_SENSE.kl.zip - [Click for QR Code] (3.2 KB, 101 views)
File Type: zip keypad_owamod_VANILLA.kl.zip - [Click for QR Code] (3.2 KB, 61 views)
The Following 6 Users Say Thank You to the1wingedangel For This Useful Post: [ Click to Expand ]
 
MacaronyMax
Old
#2  
MacaronyMax's Avatar
Senior Member
Thanks Meter 626
Posts: 13,590
Join Date: Aug 2008
Location: Oxford
That's pretty awesome Will definatley try out when I get a Z
 
g4rb4g3
Old
#3  
Senior Member
Thanks Meter 253
Posts: 478
Join Date: Jul 2009
Great news but something like that exists already for a few monts:
http://forum.xda-developers.com/showthread.php?t=795811

I used it on the Nexus One and now on the Desire Z.
 
blk_jack
Old
#4  
blk_jack's Avatar
Recognized Developer
Thanks Meter 4001
Posts: 2,055
Join Date: Jun 2010
Location: Toronto
Works great! Thanks a lot!!
 
the1wingedangel
Old
(Last edited by the1wingedangel; 19th December 2010 at 01:35 PM.)
#5  
the1wingedangel's Avatar
Member - OP
Thanks Meter 46
Posts: 93
Join Date: Feb 2009

 
DONATE TO ME
Quote:
Originally Posted by g4rb4g3 View Post
Great news but something like that exists already for a few monts:
http://forum.xda-developers.com/showthread.php?t=795811

I used it on the Nexus One and now on the Desire Z.
Not quite.

You should read the whole post, people fail to do so far too often on this forum. Of course the app exists, there are multiple versions, both pay and free, on the android market and floating around the forums.

What does not exist, is the remapped key file to make the app launch with a short press of the search key (method #1) and the remapped rosie buttons to launch the app from the right dock button (method #2).

The only method I really cared about is the short-press search button (method #1), which completely replaces the search button, so that it functions to turn off the screen (like it should have been from the factory) like the G1. This also allows it to work while the screen is still locked, so you can single press the trackpad, check the time/messages/missed call, then turn the screen back off without ever unlocking it! But I made this mod and guide, so that you have THREE options: the long-press method (like the one that you linked to) AND two NEW ways.
 
B73C
Old
#6  
Member
Thanks Meter 0
Posts: 45
Join Date: Mar 2007
Using all of the default files while running CM 6.1.1 Colourized, I can get my DZ to sleep only by long-pressing the Search button, not a short-press.

I checked the .kl file and confirmed the USER2 key is 217 and that matches my Key Test number in Recovery.

A short-press of my Search button doesn't do anything.

I've set KillScreen as the default app for the long-press and it works as it should, but I'd like to leave that as a Search (Vlingo) button and have a short-press go directly to KillScreen.

Suggestions?
 
joemm
Old
(Last edited by joemm; 18th December 2010 at 06:41 PM.)
#7  
joemm's Avatar
Senior Member
Thanks Meter 488
Posts: 1,437
Join Date: Jul 2010
Location: Surf City USA ....Huntington Beach CA.
I tried the Rosie_killscreen.apk , it installs ok i get the little power icon on my Rosie launcher bar but when I press it, it doesn't do anything, I tried to re-download the file in case it was corrupt and re-install it but the same thing happens, nothing. I installed the Rosie_contacts.apk and it work fine but can get the Rosie_killscreen.apk to work. Has anyone gotten the Rosie_killscreen.apk to work?

EDIT- My fault forgot to install the main app..... Sorry, let me try this again.

Update: The app works great on the Rosie_launcher, Just a reminder to install the KillScreen.apk first, then follow the process for pushing the app to the Rosie launcher.
Tmobile SGSIII T999
ROM: Darthstalker Version X
Kernel:Ktoonsze KT747 3/6/13

Tmobile G2 HTC Vision
ROM: Virtuous
Radio:26.08.04.30 Gingerbread Leaked
Kernel: 2.6.32.21-virtuous v2.2.0 rmk

[RADIO]
HTC VISION RADIO's THREAD
 
MRCLrider
Old
#8  
Senior Member
Thanks Meter 7
Posts: 165
Join Date: Nov 2008
Location: SW Ohio
I like this very much!! I have Launcher Pro Paid and I have set it up as one of my swipe options on the dock.
 
billnye1999
Old
#9  
Member
Thanks Meter 9
Posts: 56
Join Date: Apr 2008
I use cm6.1.1 lockscreen gestures and the "screen off and lock" app. I setup a gesture of "L" and link the gesture to the "screen off and lock" app so when I am on the lockscreen and do a "L" gesture and it shuts off the screen. I also have it set as a shortcut in the dock for adw launcher too so I can lock/screen off just by pressing it. So far it works great.
The Following User Says Thank You to billnye1999 For This Useful Post: [ Click to Expand ]
 
the1wingedangel
Old
#10  
the1wingedangel's Avatar
Member - OP
Thanks Meter 46
Posts: 93
Join Date: Feb 2009

 
DONATE TO ME
Quote:
Originally Posted by B73C View Post
Using all of the default files while running CM 6.1.1 Colourized, I can get my DZ to sleep only by long-pressing the Search button, not a short-press.

I checked the .kl file and confirmed the USER2 key is 217 and that matches my Key Test number in Recovery.

A short-press of my Search button doesn't do anything.

I've set KillScreen as the default app for the long-press and it works as it should, but I'd like to leave that as a Search (Vlingo) button and have a short-press go directly to KillScreen.

Suggestions?
I'm not really sure what the issue is. If you choose the method where Kill Screen acts as the short-press search, you will not have a long press function anymore.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Navigate to Your Favorite Places with LocationDetector

If you’re enjoying an active way of life, you probablytravel a lot, go fishing, … more

LifeStats Automatic Journal Keeps Tabs of Your Day

Most of us live very active lives. This is after all why we’re fans of mobile … more

Android App Review: Hide Your Files with Androignito – XDA Developer TV

Stop right now, look at your phone, and see how many pictures, … more

BrightNotes Makes Cloud Notes Simple and Easy

There are literally thousands of note taking apps available on Android, with practically every … more