View Single Post
mosen's Avatar
Community Council | Posts: 1,669 | Thanked: 10,225 times | Joined on Nov 2014 @ Lower Rhine
#10
Originally Posted by wolke View Post
btw, if you get something cool working for you, please pull request your changes. i might not add them to master since i cannot test it in any way (i ONLY have xperias), but others might benefit from it, and i might buy an fxtec soon myself
Do you think it is possible to do a patchmanager3 patch from that script and execute code on Key events? Or is it a potential battery hog?

EDIT:
Now i have the script altered for gpio read out and found code 10 is the state of the Keyboard.
10 - release is opened
10 - pressed is closed

EDIT 2:
Now i am able to switch on the keyboard backlight when it opens with this action in sf-button-monitor.conf
Code:
action=cmd(echo 1 > /sys/class/leds/keyboard-backlight/brightness),kb,always
where "kb" is defined as following in the script:
Code:
  [qw(10   KBD_STATE kb)],
I have not quite figured out how to set the backlight back to 0 on kbd close. But that is done anyway when the display goes off.

EDIT 3:
I just created a .desktop file in /user/share/applications/ to start the script from app-grid.
Works for now :P

Last edited by mosen; 2020-01-21 at 18:35.
 

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