Skip to content

fix(input): fire long press while the key is held - #130

Merged
RuudBurger merged 1 commit into
mainfrom
ruud/long-press-while-held
Oct 12, 2026
Merged

RuudBurger merged 1 commit into
mainfrom
ruud/long-press-while-held

Conversation

@RuudBurger

Copy link
Copy Markdown
Member

Long press only fired on keyup, so holding OK on a tile in the RN Lightning app did nothing until you let go (RNG-907, seen in the LG webOS walkthrough). Now the first keydown starts a 500ms timer and fires onLongPress while the key is still down. Keyup after that sends nothing, so onPress doesn't also fire on release. Repeats don't touch the timer, and the old duration check stays as a fallback for a timer delayed by a busy JS thread.

Timing lives in a small React-free createKeyPressTracker so it can be tested with fake timers. react-native-client carries this as a pnpm patch on 0.5.0-alpha.6 for now, it goes once this ships.

@RuudBurger
RuudBurger force-pushed the ruud/long-press-while-held branch from faf39c8 to b12beff Compare October 12, 2026 14:29
@RuudBurger
RuudBurger marked this pull request as ready for review October 12, 2026 17:19
@RuudBurger
RuudBurger merged commit df34f5a into main Oct 12, 2026
1 check passed
@RuudBurger
RuudBurger deleted the ruud/long-press-while-held branch October 12, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant