View Single Post
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#7
I know this is an old thread however I have to stick my oar in.

1. using the lock signal on dbus is silly because..what if your phone has autolock on a timeout? Potentially you could have to unlock>lock just to activate the thing!

2. Dbus scripts, while really cool is pretty heavy on cpu power, what with waking up to check every thing against it's rule set.


A far better way to do this is:

Code:
sudo echo 0 > /sys/devices/platform/gpio-switch/cam_focus/disable & sudo chmod 444 /sys/devices/platform/gpio-switch/cam_focus/disable
This sets the disable off then makes the file read only thats it. No daemons, no scripts nothing. Now with shortcutd you can set short press to task-switcher (which does nothing when the screen is off) and long press to skip/pause whatever.
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 4 Users Say Thank You to vi_ For This Useful Post: