Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

fix(ayan_gen2): Allow for key-up of button 2 when long pressed. #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/handycon/handhelds/aya_gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ async def process_event(seed_event, active_keys):
# BUTTON 2 (Default: QAM) Small Button Short Press
if active_keys in [[40, 133], [32, 125]] and button_on == 1 and button2 not in handycon.event_queue:
await handycon.handle_key_down(seed_event, button2)
elif active_keys == [] and seed_event.code in [32, 40, 125, 133] and button_on == 0 and button2 in handycon.event_queue:
# We need to account for long press as well or the button will get stuck on and everything will break.
elif active_keys == [] and seed_event.code in [32, 40, 97, 100, 111, 125, 133] and button_on == 0 and button2 in handycon.event_queue:
await handycon.handle_key_up(seed_event, button2)

# BUTTON 4 (Default: OSK) Small button Long Press
Expand Down