Reply
Thread Tools
Posts: 26 | Thanked: 3 times | Joined on Feb 2008
#1
Hi guys, i think i may have a problem on my N810

Is it possible to run a command or script which returns whether it thinks the keyboard is open or not?
 
Posts: 99 | Thanked: 65 times | Joined on Jan 2008 @ Finland
#2
You can read the keyboard slider status from /sys/devices/platform/gpio-switch/slide/state

It also seems that there's a DBus message at /org/freedesktop/Hal/devices/platform_slide, org.freedesktop.Hal.Device.

Last edited by wnd; 2008-03-25 at 23:50. Reason: more info
 

The Following User Says Thank You to wnd For This Useful Post:
Posts: 63 | Thanked: 52 times | Joined on Jan 2006 @ Brisbane, Australia
#3
Originally Posted by wnd View Post
You can read the keyboard slider status from /sys/devices/platform/gpio-switch/slide/state

It also seems that there's a DBus message at /org/freedesktop/Hal/devices/platform_slide, org.freedesktop.Hal.Device.
The dbus message only seems to tell you the keyboard cover state changed, it doesn't tell you if it is open or not. You need the /sys/... for that.
__________________
Programmer, connectivity, sensors, Jolla/llornkcor technologies
 
Posts: 88 | Thanked: 15 times | Joined on Jun 2007
#4
anybody have an example of how to connect to this dbus signal in python?
 
Posts: 99 | Thanked: 65 times | Joined on Jan 2008 @ Finland
#5
Originally Posted by lpotter View Post
The dbus message only seems to tell you the keyboard cover state changed, it doesn't tell you if it is open or not. You need the /sys/... for that.
Ah, of course. DBus way would be to listen for changes or ask DBus to signal the status. In any case my bad.

In other words, jgallen23, you'll have to read the status from sysfs and forget DBus unless you're only interested in status changes.
 
Posts: 88 | Thanked: 15 times | Joined on Jun 2007
#6
I am interested in status changes, can't quite figure it out though
 
Posts: 88 | Thanked: 15 times | Joined on Jun 2007
#7
I got it working, if anybody wants me to post the code, let me know
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:09.