pop-os / system76-dkms

System76 DKMS driver
GNU General Public License v2.0
38 stars 20 forks source link

Detect Fn + 1 #24

Open ariselseng opened 5 years ago

ariselseng commented 5 years ago

Hello, I want to detect and catch keypress Fn + 1 in my application: https://github.com/cowai/pwm-better-fan-control Is there any way except checking for pwm1 == 255? I also notice that pwm1_enable stays the same when pressing the hotkey. It would be nice for instance pressing fn + 1 made pwm1_enable be 0 or something.

jackpot51 commented 5 years ago

It should be sending a WMI event, I do not know which one but you could add debugging to find out.

ariselseng commented 5 years ago

@jackpot51 I can confirm that it does. 0x8F is ON and 0x70 is back to auto.

Would you accept a PR for this to throw a keycode? Do you have any suggestions for what key that should be?

jackpot51 commented 5 years ago

I do not recommend that a keypress is generated from this driver for those two conditions, as there are no compatible keycodes.

ariselseng commented 5 years ago

@jackpot51 Yes, doesn't feel right. What would you recommend doing instead? Any ideas?

ariselseng commented 5 years ago

This seems interesting: https://lore.kernel.org/patchwork/patch/843457/