Skip to content

"0" as KCAction key #2

@eygengrau

Description

@eygengrau

Hi! First of all thank you for tackling keychords for autohotkey. It really needs that feature.

Now for my issue: If I create a KCAction with a key of "0", it gives me an error of "no input received".

Example

#SingleInstance Force
#Include ./KeyChord.ahk
testChord := KeyChord(KCAction('0', () => MsgBox('digit'), True, 'Digit'))
KCManager.Execute(testChord, 1, 5)

I think this has to do with line 1124

if not input or (input == "Timeout")

Seems like autohotkey evaluates "0" to a falsy value.

The example works fine, if I change the line to

if (input == "" or input == "Timeout")

But since I neither have much insight into your library nor much experience regarding autohotkey in general, I don't know about possible side effects of that change.

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