Repository navigation
fix(input): fire long press while the key is held - #130
Merged
Merged
Conversation
RuudBurger
force-pushed
the
ruud/long-press-while-held
branch
from
October 12, 2026 14:29
faf39c8 to
b12beff
Compare
RuudBurger
marked this pull request as ready for review
October 12, 2026 17:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.