-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect Fn-lock status for vivobook on startupp #1596
Comments
@krystean I have separated this, as otherwise it confuses guy from original issue. As this is not related to his case anyhow. Can you check if running this command returns correct (actual) status of hardware fn-lock in your case (as 1 and 0) ?
|
@seerge Sorry about that and thank you! The output of the command you gave above is:
The output of the command:
which turns on Fn-Lock, that is
The Thanks! |
@krystean good, but what does
return when fn-lock is on ? If it's readable it should be 65537 |
The output of the command
when Fn-Lock is off:
when Fn-Lock is on:
It's 65536 when both on and off. Thanks! |
@krystean then it's a bad news :) it means you can't read a status of fn-lock, therefore g-helper can't sync it's visualization with what actually happens. Maximum i can offer - is to reset fn-lock in app (i.e. in UI) to OFF every time app starts. Will that work ? |
@seerge Instead of reading the status of the Fn-Lock from the system, can we instead enforce the status on G-Helper? :) In
is run using the value of Thanks! |
@krystean this build will run fn-lock command on app start based on config setting |
@seerge Thanks! I tried reading the code and made a few changes myself and I think I figured it out: I corrected the ternary operation in the first change. I think I had a hand in this as I remember you had to flip the command when the Fn-Lock was still a checkbox in Extra. Sorry lol The second change is copying the line you added in f8df547 for init-ing FnLock so that it runs during logon too because Fn keys' alternate functions revert to Windows default ones after waking up from sleep. Applying these changes on my end make Fn-Lock work as I expect, however, I don't know if it's the best practice lol Thanks! |
@krystean try this build |
@seerge This works even better! Fn-Lock turns on even on the lock screen. Thanks! |
For a while now, after the laptop wakes up from sleep, I have to turn on and off Fn Lock so that secondary functions of F keys work (volume, etc.). It seems that after waking up from sleep/hibernation, the F keys work as normal F keys. I thought it was just some minor quirk of the app so I didn't report or open an issue. However, this issue lead me to think more about why this is happening.
Just for context (from Computer Hope) :
On my device (Vivobook X515, with dedicated Fn-Lock), if I turn on Fn-Lock via the keyboard (Fn+Esc), G-Helper reports that Fn-Lock is off and vice versa. So it seems, that the Fn-Lock toggle in G-Helper (v0.129) is reversed?
Also, I noticed that upon waking up from sleep, the Fn-Lock on G-Helper stays on. On laptops with a dedicated Fn-Lock with an LED indicator, it is of course turned off. So, I think G-Helper should turn off Fn-Lock upon waking up from sleep/hibernation.
So the flow might be like:
G-Helper starts up/wakes from sleep/Fn-Lock OFF: UI Fn-Lock OFF (grey) & run this
commandwith Control_status=0 (for laptops with a dedicated Fn-Lock) & process the secondary functions of F-keys {if WMI 78 (dedicated Fn-Lock) -> Fn-Lock ON}
Fn-Lock ON: UI Fn-Lock ON (blue) & run this
commandwith Control_status=1 & do not process F keys' secondary functions (that is, F keys work normally) but still listen to certain WMI events like 78 {if WMI 78 -> Fn-Lock OFF}
Thanks!
Originally posted by @krystean in #1581 (comment)
The text was updated successfully, but these errors were encountered: