OESF Portables Forum

Model Specific Forums => Cosmo Communicator => Cosmo Communicator - Linux => Topic started by: oida on December 26, 2020, 03:53:46 pm

Title: keep keyboard backlight after closing device
Post by: oida on December 26, 2020, 03:53:46 pm
Dear users
I usually type
echo 42 > /proc/aw9524_led_proc
in the terminal to switch on keyboard backlight in gemian. After I close the lid and reopen it, the keyboard backlight is off again and I have to type that again. Does anyone of you maybe know of a way to keep this permanent or a way to execute that command after opening the device automatically? Like "If open lid, then echo 42 > /proc/aw9524_led_proc"
TIA
Title: Re: keep keyboard backlight after closing device
Post by: asyik on January 10, 2021, 06:48:54 am
any luck with this?
Title: Re: keep keyboard backlight after closing device
Post by: MonkeyControl on February 05, 2021, 02:50:09 am
Dear users
I usually type
echo 42 > /proc/aw9524_led_proc
in the terminal to switch on keyboard backlight in gemian. After I close the lid and reopen it, the keyboard backlight is off again and I have to type that again. Does anyone of you maybe know of a way to keep this permanent or a way to execute that command after opening the device automatically? Like "If open lid, then echo 42 > /proc/aw9524_led_proc"
TIA
I thought about this myself, but more in a UBPorts than Gemian way, I even asked the question on the UBPorts forum (https://forums.ubports.com/topic/3453/cosmo-communicator/8), more around creating keyboard shortcuts generating the effect required than opening the keyboard, sort of 'If (shift + fn + n), then echo 45 > /proc/aw9524_led_proc' , 'If (shift + fn + b), then echo 40 > /proc/aw9524_led_proc' rather than 'If open lid, then echo 42 > /proc/aw9524_led_proc', but my question was just a little post as a point of interest in an existing thread rather than an explicit question, I wouldn't even know how to generate a 'feature request'. 
You got me thinking though.  If you want the keyboard backlight to turn on when you open it, (specifically because the keyboard backlight turned off when you closed it), is there already a bit of code with a line that states 'If close lid, then echo 40 > /proc/aw9524_led_proc', that we just need to add your line of code below that states, 'If open lid, then echo 42 > /proc/aw9524_led_proc' below. 
This is all in principle of course, there's probably a lot more to it than that, but if the keyboard backlight turns off when the Cosmo is closed, there is already some form of integration there, just what it is, and how to expand on it. 
I wouldn't have a clue how to even begin to investigate or implement this, for now as a workaround I just open the terminal and use the up cursor to get to the good old 'echo 45 > /proc/aw9524_led_proc' command. 
Title: Re: keep keyboard backlight after closing device
Post by: oida on February 14, 2021, 01:30:30 pm
no need to open terminal, just click on the battery symbol at the right bottom to change keyboard brightness.