Skip to content

Tap and Send immediately #2

@eltoncezar

Description

@eltoncezar

Hi, first of all, thanks for the amazing work with this library!

What I want to achieve is something like that:

  • If I press "s", send "s"
  • If I hold "s", send "Ctrl+s"

I came up with the following code:

thm := new TapHoldManager()
thm.Add("s", Func("MyFunc1"))

MyFunc1(isHold, taps, state){
    if (isHold) {
        Send ^s
    } else {
        Send s
    }
}

It works and sends the "s" correctly, but only after the default tapTime of 200ms, which is not desirable. I want to send the "s" immediately, but retaining the hold functionality.

What is the right way to achieve this using your library?

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