Skip to content
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

ROG Flow Z13 Fn+ROG key cannot open g-helper after reconnect keyboard #1581

Closed
ZhengWugeng opened this issue Nov 10, 2023 · 8 comments
Closed
Labels
question Further information is requested

Comments

@ZhengWugeng
Copy link

log.txt

Describe the bug
After reconnecting the keyboard, the ROG function (Fn+ space/ F1-F12) cannot use. Unless restart the g-helper

Clear scenario to Reproduce
Steps to reproduce the behavior:

  1. open the ghelper
  2. disconnect the keyboard
  3. connect the keyboard
  4. Explanation of an error or a bug

Expected behavior
the function of Fn+space/F1-F12 can run functionally

App Logs
Please include and attach log.txt from %AppData%\GHelper

Desktop (please complete the following information):

  • Windows 11
  • Laptop model

Asus software

  • Armoury Crate (or it's services installed)
  • MyASUS installed
  • Other Asus services running in background
@seerge
Copy link
Owner

seerge commented Nov 10, 2023

@ZhengWugeng because app establishes connection with keyboard only on start and wake up from sleep / hibernate.

Why do you disconnect / reconnect your keyboard in a first place and how often do you do that ? :)

@seerge seerge added the question Further information is requested label Nov 10, 2023
@ZhengWugeng
Copy link
Author

Because Flow Z13 is a 2-in-1 laptop (like Microsoft Surface) and use the handwriting function with keyboard connected is very unsatisfact. I used it like iPad, which makes me use it frequency with surface pen (1 day 2-3 hours maybe) :)

@krystean
Copy link

krystean commented Nov 11, 2023

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) :

The FnLk, F-Lock key is a toggle on a PC compatible keyboard used to enable or disable the F1 through F12 keys' secondary functions (hotkeys)...
Pressing and releasing the F-Lock key toggles on, or enables, the F1-F12 keys to use their standard functions. Pressing the F-Lock key again toggles off (disables) the F1-F12 key standard functions, and turns on the ability to use the secondary functions on those keys.

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 command with 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 command with 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!

@seerge
Copy link
Owner

seerge commented Nov 11, 2023

@ZhengWugeng try this build
GHelper.zip

@krystean honestly, your question is unrelated to this issue. On Vivobooks Fn-lock is native and is handled by hardware itself (unlike all other models, where g-helper literally emulates it)

@ZhengWugeng
Copy link
Author

@seerge It worked without problem, Thanks!

@krystean
Copy link

@seerge sorry, they mentioned that they cannot use the F1-F12 keys which reminded me of this issue I'm having.

On Vivobooks Fn-lock is native and is handled by hardware itself (unlike all other models, where g-helper literally emulates it)

Ahh, I get it now, thanks! I've disabled G-Helper and all ASUS services then put the laptop to sleep. After waking up, the secondary function of F-keys printed on them did not work.

According to this windows support topic:

If your keyboard has an F Lock key, press it to toggle between the standard commands and alternate commands.

When the F Lock light is Off, alternate functions work (Help, Undo, and so on).
When the F Lock light is On, standard functions work (F1, F2, and so on).

So upon waking up, the Windows F-key alternate functions are the default (Help, Undo, and so on), not the one printed on the keys. If I press Fn + an F key, the one printed on the label executes. My laptop does not have a dedicated F-Lock key, but instead uses a key combo, Fn + Esc, to enable it. Pressing the key combo does nothing. This is where G-Helper comes in.

If G-Helper is running, it recognizes the key combo Fn+Esc and runs this command
Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DEVS -Arguments @{Device_ID=0x00100023; Control_status=1}
to turn on F-Lock (G-Helper though reports F-Lock is off). Pressing the key combo again, turns off F-Lock, but this time, the alternate functions of the F keys are now the ones printed on the keys. So, the command with Control_status set to 0 replaces the Windows default F-key alternate functions into the printed-on-key ones. This persists until the device sleeps/hibernates.

Wrapping up:

@ZhengWugeng because app establishes connection with keyboard only on start and wake up from sleep / hibernate.

Does G-Helper read its config.json on start and wake? In the file there is an entry for fn_lock. I'd like to request that G-Helper run the command above with Control_status set to the value of fn_lock upon start and wake and whenever Fn-Lock is toggled in the UI. Thank you!

@ZhengWugeng
Copy link
Author

@krystean I used the latest pack, it worked. Maybe it is not because keyboard on only start and wake up (The official app, Armoury Crate could establish connection every time connected with keyboard). And for config.json. I didn't find it. Is it in the "helper" folder?

@krystean
Copy link

@ZhengWugeng oops sorry, my reply was meant for the dev. I thought quoting disables mentions lol If it's working now, you don't need to do anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants