Skip to content

Keys get stuck sometimes #14

Open
Open
@trajano

Description

@trajano

I remapped the side buttons of my mouse to the mouse wheel but it sometimes locks.

@ahk.hotkey("XButton2")
def scroll_up():
    while ahk.is_key_pressed("XButton2"): # remains true forever sometimes
        ahk.send("{WheelUp}")
        ahk.sleep(0.010)

@ahk.hotkey("XButton1")
def scroll_down():
    while ahk.is_key_pressed("XButton1"): # remains true forever sometimes
        ahk.send("{WheelDown}")
        ahk.sleep(0.010)

Using is_key_pressed_logical does not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions