View Single Post
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#5
You may try dbus-scripts.
Write a script to turn screen on every few seconds while
keybord open. And call this script from dbus-scripts when keyboard opened.

For example:
dbus-scripts setting:
/home/user/stay_lit.sh * * org.freedesktop.Hal.Device Condition ButtonPressed cover

Your script (/home/user/stay_lit.sh)

Code:
#!/bin/sh
# path to the keyboard slide state
SLIDE_PATH=/sys/devices/platform/gpio-switch/slide/state

TIMEOUT=25
read SLIDE_STATE < $SLIDE_PATH
while [ "$SLIDE_STATE" == "open" ]; do
# dbus-call to stop display blanking, I thought this one should turn light on 
# for at least 60 seconds, but it depends on your display settings.
  run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_display_blanking_pause
  sleep $TIMEOUT
  read SLIDE_STATE < $SLIDE_PATH
done
The TIMEOUT value has to be less than your display blank time.

regards nicolai
 

The Following 3 Users Say Thank You to nicolai For This Useful Post: