小智 4
我也曾为此苦苦挣扎,最终想出了一个解决方案:
https://gist.github.com/ps1dr3x/b15c62eafb388ddf8bb7d3896d1a1cee
input
基本上,您可以通过更改 /sys/class/leds/ /brightness中的亮度值来打开/关闭键盘背光
例如
sudo sh -c 'echo 1 > /sys/class/leds/input0::scrolllock/brightness'
Run Code Online (Sandbox Code Playgroud)
PSinput
可能会有所不同