maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   is there any way to come to lockscreen by pressing volume or camera key than power key??? (https://talk.maemo.org/showthread.php?t=85770)

insanelysexy 2012-07-30 06:07

is there any way to come to lockscreen by pressing volume or camera key than power key???
 
pllzzzzz... as my power button is gettin very loose...

sixwheeledbeast 2012-07-30 11:32

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
What device?
If N900...
It's possible to make the camera button work while locked (info is on this forum), then maybe setup the camera focus to call a dbus command?

michaaa62 2012-07-30 11:38

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
Sliding the camera shutter open unlocks the device, even circumventing the lockscreen.
With flashlight installed, you could choose between camera, flashlight or, by tapping in the blurred area, desktop.

Hurrian 2012-07-30 11:39

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
Follow this guide, replace "long press" command with
Code:

dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"unlocked"

SamGan 2012-07-30 12:21

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
If it is N9 you can install "lockscreen", a software button to lock your screen.

insanelysexy 2012-07-30 12:33

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
i actually dont want to unlock phone, just want to reach the lockscreen!! love sliding the bar to unlock. the camera cover unlocks the phone!
is there any way to reach lockscreen with volume keybor camera key?

qwazix 2012-07-30 13:16

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
this script from nicolai simulates a power button press. You can assign it to camera button using shortcutd

you will need root so this syntax may prove useful

Code:

sh -c 'echo " your command here " | sudo gainroot'
or


Code:

sh -c 'cat myscript.sh | sudo gainroot'

insanelysexy 2012-07-30 14:06

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
umm.. many thanks!! but i am a complete beginner, so a little easy method wil be of a great help .. thanks neways :)

sixwheeledbeast 2012-07-30 16:08

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
beginners version of qwazix method...

Open leafpad, copy "script" to new document.
Save somewhere i.e

Code:

/home/user/.myscripts/camlockscreen.sh
Then make cam button in shortcutd use the following custom command.

Code:

sh -c 'echo "/home/user/.myscripts/camlockscreen.sh" | sudo gainroot'

insanelysexy 2012-08-29 22:18

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
hey guys thanks!! i actually did was applying the long press with unlocking dbus command using shortcutd. now i want to use it like in android -- one click lock, another click unlock..

here is what i did:---

1. dbus-scripts.d

insanelysexy 2012-08-29 22:26

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
1.dbus-scripts.d

made a file "lock" with " /home/user/MyDocs/.documents/wl.sh * * com.nokia.mce.signal tklock_mode_ind locked

/home/user/MyDocs/.documents/wu.sh * * com.nokia.mce.signal tklock_mode_ind unlocked"

2. in .documents : ->

wl.sh -

#!/bin/sh

cd /home/user/MyDocs?.documents

sed 's/locked/unlocked/g' lock.sh > ltemp.sh ( tried to directly output it to lock.sh but it gave a blank lock.sh)

mv ltemp.sh lock.sh



wu.sh -

#!/bin/sh

cd /home/user/MyDocs/.documents

sed 's/unlocked/locked/g' lock.sh > utemp.sh

mv utemp.sh lock.sh


lock.sh

dbus-send ... to lock n unlock ..... req_tklock_mode_change string:'locked'

3. in shortcutd

short press -> custom shell command
"sh /home/user/MyDocs/lock.sh'



but its not working.... its either just locking or unlocking....

insanelysexy 2012-08-30 14:52

Re: is there any way to come to lockscreen by pressing volume or camera key than power key???
 
GOT IT WORKING :) :)
shortcutd with dis script -->

if dbus-send --print-reply --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.get_tklock_mode | grep -q unlocked
then
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked"
else
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"unlocked"
fi


All times are GMT. The time now is 14:19.

vBulletin® Version 3.8.8