|
2008-07-02
, 13:13
|
Posts: 34 |
Thanked: 21 times |
Joined on Feb 2008
|
#22
|
|
2008-07-02
, 14:53
|
Posts: 2,152 |
Thanked: 1,490 times |
Joined on Jan 2006
@ Czech Republic
|
#23
|
|
2008-07-02
, 15:02
|
Posts: 34 |
Thanked: 21 times |
Joined on Feb 2008
|
#24
|
|
2008-07-02
, 23:17
|
Posts: 2,152 |
Thanked: 1,490 times |
Joined on Jan 2006
@ Czech Republic
|
#25
|
user ALL = NOPASSWD: /etc/powerlaunch/*
#!/bin/sh b=/sys/class/leds/keyboard/brightness lux=/sys/devices/platform/i2c_omap.2/i2c-0/0-0029/lux on(){ echo >$b 10 } off(){ echo >$b 0 } maybe_on(){ if [ `cat $lux` -lt 5 ] ; then on ; else off ; fi } case $1 in on) on ;; off) off ;; *) maybe_on ;; esac
keyboard_slide_open = if $islocked unlock_keys ; call keyboard_light_on keyboard_slide_close = if $relock tklock.main.lock ; call keyboard_light_off keyboard_light_on = exec "sudo /etc/powerlaunch/kb_light" keyboard_light_off = exec "sudo /etc/powerlaunch/kb_light off"
|
2008-07-03
, 13:06
|
Posts: 34 |
Thanked: 21 times |
Joined on Feb 2008
|
#26
|
and it turns keyboard light off when kb is closed and turns it on when opened in a dark. This is already enough for me but perhaps it also needs to be turned on/off when slide is open and screen is turned on/off. However, I am not sure how to do it.
|
2008-07-03
, 14:11
|
Posts: 2,152 |
Thanked: 1,490 times |
Joined on Jan 2006
@ Czech Republic
|
#27
|
Thanks. I haven't tried it but shouldn't the keyboard light already be independent of the state of the screen?
|
2008-07-03
, 14:47
|
Posts: 33 |
Thanked: 8 times |
Joined on Apr 2008
|
#28
|
hey karel...ive been running it for a while....solely for the ability to have soft power off...thats all...no other reason....or atleast none that i can remember.....if someone would possibly come up with some examples...and post them here ...that would well be awesome...
|
2008-07-03
, 15:05
|
Posts: 34 |
Thanked: 21 times |
Joined on Feb 2008
|
#29
|
dbus_powered_DisplayState = ifeq $1 on system.device.checksoftpoweroff; ifeq $1 on display_state_on off display_state_off dimmed display_state_dimmed display_state_on = display_state_off = display_state_dimmed =
|
2008-07-03
, 21:54
|
Posts: 2,152 |
Thanked: 1,490 times |
Joined on Jan 2006
@ Czech Republic
|
#30
|
Then in n810.conf, you can configure these events as you wish, e.g. display_state_off = call keyboard_light_off
display_state_on = if $isN810 n810.keys.display_state_on display_state_off = if $isN810 n810.keys.display_state_off display_state_dimmed = if $isN810 n810.keys.display_state_dimmed
[keys] display_state_on = if $is_slide_open keyboard_light_on display_state_off = if $is_slide_open keyboard_light_off display_state_dimmed = if $is_slide_open keyboard_light_off hal_org_freedesktop_Hal_devices_platform_kb_lock_button_state_value = if $1 key_press_kb_lock key_release_kb_lock key_press_kb_lock = switch tklock.main key_release_kb_lock = hal_org_freedesktop_Hal_devices_platform_slide_button_state_value = if $1 keyboard_slide_close keyboard_slide_open keyboard_slide_open = set is_slide_open 1 ; if $islocked unlock_keys ; call keyboard_light_on # relock if you quickly open and then close the keyboard unlock_keys = call tklock.main.unlock; set relock 1; timer_set n810.keys.keep_unlocked 10 keep_unlocked = set relock 0 keyboard_slide_close = set is_slide_open 0 ; if $relock tklock.main.lock ; call keyboard_light_off keyboard_light_on = if $is_kb_light_on nop set_keyboard_light_on ; set is_kb_light_on 1 keyboard_light_off = if $is_kb_light_on set_keyboard_light_off ; set is_kb_light_on 0 set_keyboard_light_on = exec "sudo /etc/powerlaunch/kb_light" set_keyboard_light_off = exec "sudo /etc/powerlaunch/kb_light off"
Newbies click here before posting. Thanks.
If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.