mikhail-m1 / illuminanced

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

Editable Toggle Keybinding #17

Open wherron01 opened 5 months ago

wherron01 commented 5 months 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 4 months 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 months 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 months 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.

mikhail-m1 commented 3 months ago

I will take a look and make the change when I have time

WAPEETY commented 2 months ago

is there any update about this?

mikhail-m1 commented 1 month ago

sorry, I just haven't had time to make the change, the main question is can it be just special key or support for modifier keys (like Control) is also necessary? I see that wherron01 used KEY_OPEN, but do Framework laptops always have some good option to chose from?