Skip to content

Behavior of ifNotPlaytime $myTimeout after delayUntilReleaseMax differs between UHK 60 and UHK 80 #1518

@lo48576

Description

@lo48576

The code below works differently on UHK 60 and UHK 80.

setVar myTimeout 500
pressKey iLS

// REPRODUCE: Hit the timeout by holding more than 500 ms ($myTimeout).
delayUntilReleaseMax $myTimeout

// EXPECTED: NOT jumping to `releasedQuickly` because the previous
// `delayUntilReleaseMax` timed out and 500 ms passed.
//
// ACTUAL: Jumps to `releasedQuickly` on UHK 60 (unexpected),
// but NOT on UHK 80 (expected).
ifNotInterrupted ifNotPlaytime $myTimeout goTo releasedQuickly

// If pressed for long, the execution is expected to reach this line.
// ...

releasedQuickly:

By pressing a key for long with this macro assigned:

  • On UHK 80 (firmware 16.2.1), goTo ReleasedQuickly is NOT invoked. This is expected behavior.
  • On both UHK 60 v1 and v2 (firmware 16.2.1), goTo ReleasedQuickly is invoked. This is unexpected behavior.

This can be worked around by changing ifNotPlaytime $myTimeout to ifNotPlaytime ($myTimeout-1).

In fact I'm not sure this is a bug because the both behavior would be justifiable to some extent, and this is even OK to me if this works without reproducible result (since this kind of naive timeout handling might be very sensitive to hardware/firmware internals, and it is very easy to work around on user side).
However, I'm reporting this just in case this kind of (possibly consistent) behavior difference between UHK models were not acceptable to the dev team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions