Active Topics

 


Reply
Thread Tools
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#1
Is there a way to detect a button push (for instance the camera button) when the phone is locked and have something happen, like run a script?

What I would like is to be able to reach in my pocket and push some button and have the phone vibrate for a moment if there are any notifications, so I don't have to pull the phone out and look for the light. I think it'd be a nice little feature. Could be a little code in the vibrations -- two buzzes for text messages, one for emails, something like that.
 
Posts: 166 | Thanked: 30 times | Joined on Apr 2010 @ Halifax, UK
#2
dunno about a button but try call notify
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#3
Thanks, but that's not at all what I'm looking for. I want to be able to tell if there's a message without even taking my phone out of my pocket, let alone looking at the screen.
 
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#4
Maybe you can use dbus-monitor to see if there is still dbus button actions when the screen is locked and you press say camera key.

From what I understand, I believe dbus is active at all time so you should see the key action on dbus.
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#5
I'm trying dbus-monitor --system and nothing appears when pressing the camera or volume buttons, sadly. Does that mean there's no way I can detect them?

Something does appear (but after a delay) when the power button is pressed. The delay is unfortunate but I could settle for it if need be.
 
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#6
I tried listening to cam key on my device and got the same result you mentioned. On the other hand, it doesn't look like you can listen to volume key through dbus, maemo-status-volume grabs the key already. See http://wiki.maemo.org/Documentation/...me.2Fzoom_keys

Sorry I can't help further.
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#7
There is a program that will add an icon to the status bar and will bleep and vibrate every N seconds when there is an unread msg or missed call, i don't remember the name right now though.
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#8
Hm, if what I was asking for is impossible maybe I'll try that out. I used to find it sometimes useful when one of my old phones did that, but also sometimes very annoying (buzzing periodically all night, just out of reach so it's a lot of effort to placate it...)

Perhaps it's functionality I missed reading about in Call Notify, which Matthew suggested above.
 
Posts: 19 | Thanked: 14 times | Joined on Apr 2010
#9
Though not as convenient as the camera or volume buttons, the lock slider between the right speaker and audio port can do the trick. dbus-monitor --system shows several messages when I press it, but I think the most useful one out of them is this one:

signal sender=:1.13 -> dest=(null destination) serial=7006 path=/org/freedesktop/Hal/devices/platform_kb_lock; interface=org.freedesktop.Hal.Device; member=Condition
string "ButtonPressed"
string "cover"
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#10
I'd considered that... My concern was that if I unlocked it to get a possible buzz I wouldn't be able to tell if I'd locked it again properly afterwards without getting the phone out.
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:30.