Open aspiers opened 1 year ago
Hi @aspiers,
Thanks for feedback about the documentation. I haven't touched the tool for a while and honestly don't remember much about it, unfortunatly I have had just one laptop for with a light sensor and I don't use it anymore. I will try to look at your understanding of the config and provide some feedback when I have time. I am not sure what laptop do you use and does it have anything similar to Fn-A. But as far as I remember the same way can be used to catch any special key, obviously with some code changes. There are tools to monitor keyboard events on linux but I don't remember names.
Thanks for the reply! I have a Framework 13" and it doesn't have anything similar to Fn-A but it does have a Fn button. I'm aware of commands like evtest
(and also showkey
for virtual ttys outside Xorg) but it would be great if the docs explained how to reconfigure which special key illuminanced reacts to, because it's far from clear based on the sample config:
event_device_mask = "/dev/input/event*"
event_device_name = "Asus WMI hotkeys"
The key code for Fn-A
isn't visible anywhere in that config, so I guess that must mean it's hardcoded?
Hey, the key is hardcodef here and Fn+A is #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
on my laptop. You can try to find another key to replace it, or combination but in this case you would need to make a bit bigger change.
Thanks for the info, I'll give that a go!
I looked at Framework 13" and Fn-Space looks like the key, so if you find right event_device_name it might work as is.
Hi there, and thanks for this nice utility!
I couldn't easily understand some things from the README.md:
points_count
refers to the number of points in the[light]
section, and that eachlight_n
should be in the range[0..light_steps)
but it's not at all obvious how these are connected. I think I figured it out by reading the source code and looking at the example config fileilluminance.toml
, but please let me know if my understanding is correct:[0..light_steps]
is a more user-friendly re-mapping of the backlight brightness scale from[min_backlight..max_brightness]
illuminance_n
values relate to values from thein_illuminance_raw
device, which are mapped to the brightness scale via linear interpolation. So with the example values given, if the illuminance device reads a raw value of 400, that is 25% of the way between point 2 (with value 300) and point 3 (with value 700), so it gets mapped to a value of 2.25, i.e. 22.5% of the range betweenmin_backlight
andmax_brightness
.step_barrier
prevents changes of brightness if the mapped illuminance value changes less than the barrier amount, i.e. a change from 2 to 2.05 wouldn't change the backlight, but a change from 2 to 2.25 would, in which case it's effectively a noise reduction technique. But then why is the Kalman filter needed?[kalman]
section?[0..light_steps]
not[0..light_steps)
because the example config file haslight_5 = 10
implying that the maximum value of 10 is permitted.<Fn> + A
is supposed to switch modes, but I don't see how this is possible on my keyboard where<Fn> + A
doesn't register any event? The example config hasevent_device_name = "Asus WMI hotkeys"
which clearly won't work except for some Asus machines. How can the rest of us determine the right value?