HandheldCompanion icon indicating copy to clipboard operation
HandheldCompanion copied to clipboard

HC with Ayaneo OEM keys can get stuck always holding the Ctrl key

Open CasperH2O opened this issue 1 year ago • 5 comments

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 avatar Feb 16 '24 11:02 CasperH2O

@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.

DevL0rd avatar Feb 16 '24 15:02 DevL0rd

@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.

Valkirie avatar Feb 16 '24 15:02 Valkirie

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.

CeruleanSnake avatar Mar 11 '24 08:03 CeruleanSnake

Need to try this for sure, seems like a straightforward and nice fix.

CasperH2O avatar Mar 12 '24 07:03 CasperH2O

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.

CasperH2O avatar May 23 '24 11:05 CasperH2O