mikhail-m1 / illuminanced

Ambient Light Sensor Daemon for Linux
GNU General Public License v3.0
49 stars 15 forks source link

Editable Toggle Keybinding #17

Open wherron01 opened 3 weeks ago

wherron01 commented 3 weeks ago

As KEY_ALS_TOGGLE is neither available by default nor possible to set on most keyboards (including my Framework Laptop), there should be a way to change what keybind toggles between modes. KEY_ALS_TOGGLE is a sane default, but without options I am locked into ambient light sensing mode always, which is inconvenient in some situations (like watching a movie). This could be an option in the illuminaced.toml file.

mikhail-m1 commented 2 weeks ago

hey, I looked at one from the Framwork laptops, and I think there is a Fn-Space combination should be KEY_ALS_TOGGLE. I wrote about in in one of the issues, but haven't received any feedback. Could you please check what key code does it send?

wherron01 commented 4 days ago

Fn-Space is a keyboard backlight toggle. The keyboard itself has a backlight and that keystroke toggles it. It doesn't send any keycode to the machine. Additionally, I consulted the QMK developers on how to add a KEY_ALS_TOGGLE to the keyboard, and it appears that is not possible due to the limitations of the default HID specification — that keystroke only exists in proprietary implementations. Regardless, it would be nice to have a way to change the keybind to make this project more portable whether the Framework Laptop itself has a KEY_ALS_TOGGLE or not.

wherron01 commented 4 days ago

I took it upon myself to write some bad code in a language I haven't used before (rust) that enables just this. I pushed it to my fork of this repo. Not gonna submit a PR because I also changed the toml file pretty significantly for my personal config and added a debug script and my code just frankly isn't good, but you can look over there if you need inspiration.