HandheldCompanion
HandheldCompanion copied to clipboard
HC with Ayaneo OEM keys can get stuck always holding the Ctrl key
Device manufacturer
- [x] AYANEO
- [ ] AYN
- [ ] AOKZOE
- [ ] ASUS
- [ ] GPD
- [ ] ONEXPLAYER
- [ ] VALVE
Device model Ayaneo
Handheld Companinion Version 0.20.4.1
Describe the bug
Reported by pironiero on Discord. Note, I've personally also had this.
Using HC on Ayaneo with some of the OEM keys, after pressing them, the Ctrl key remaisn consitently pressed (virtually) until a HC restart.
To Reproduce Steps to reproduce the behavior: Found the reason for it, after I boot the system, HC starts and loads desktop profile and the if after all that i press aya button - virtual CTRL button gets stuck and if i for example move left stick up or down, desktop items stark scaling and links that i press in browser start open in new tab etc....
Expected behavior Not getting stuck, not keeping Ctrl pressed.
@CasperH2O I found this issue setting up my ayaneo slide, i see some of the profiles use the wrong key combo.
Example
This worked fine: new List<KeyCode> { KeyCode.LControl, KeyCode.LWin, KeyCode.F17 },
But this did as you described. new List<KeyCode> { KeyCode.LControlKey, KeyCode.LWin, KeyCode.F17 },
I see most ayaneo devices using that RControlKey, instead of RControl or LControl.
When I did the wrong one for ctrl key, i'm pretty sure the bug you described happened.
@CasperH2O I found this issue setting up my ayaneo slide, i see some of the profiles use the wrong key combo.
Example
This worked fine: new List<KeyCode> { KeyCode.LControl, KeyCode.LWin, KeyCode.F17 },
But this did as you described. new List<KeyCode> { KeyCode.LControlKey, KeyCode.LWin, KeyCode.F17 },
I see most ayaneo devices using that RControlKey, instead of RControl or LControl.
When I did the wrong one for ctrl key, i'm pretty sure the bug you described happened.
@CasperH2O I suggest we test LControl here and check for regressions.
I'd like to second this, but with the alt key too.
On any of my Aya neos, particularly on the custom buttons, if a macro button is set to hold down, the alt key also becomes stuck. It does not affect it if the macro is set to press.
Need to try this for sure, seems like a straightforward and nice fix.
Tried this on my Ayaneo 2021 Pro, which uses the Ctrl key for its (KB) button. Tried with and without Desktop layout activated, was unable to reproduce with a default code base i.e. with:
// Conflicts with Ayaspace when installed
this.OEMChords.Add(new DeviceChord("KB key",
new List<KeyCode> { KeyCode.RControlKey, KeyCode.LWin, KeyCode.O },
new List<KeyCode> { KeyCode.O, KeyCode.LWin, KeyCode.RControlKey },
false, ButtonFlags.OEM3
));
Tried with both the button used and not used as a hotkey.