keymap: keep idle and time at physical press for nested pending - #707
Merged
Conversation
rgoulter
commented
Aug 21, 2026
Comment on lines
+338
to
+343
| /// Snapshot of `KeymapContext` at the physical press that created | ||
| /// `pending_state`. | ||
| /// Used for nested replacements (e.g. chorded passthrough to | ||
| /// tap-hold) so `required_idle_time` and `quick_tap_ms` are | ||
| /// checked against the press, not the outer timeout. | ||
| pending_press_context: Option<KeymapContext>, |
Owner
Author
There was a problem hiding this comment.
This ... apparently works.
But it surely seems like way too much to store; especially without other requirements for it.
My feeling is that storing something like "timings at pending" is appropriate, but the whole keymap context? e.g. also includes recent presses.
rgoulter
commented
Aug 21, 2026
Comment on lines
+617
to
+632
| let nested_press_ctx = if let Some(ctx) = self.pending_press_context { | ||
| // Stored snapshot already excludes the current | ||
| // press from the ring; use it directly. | ||
| ctx | ||
| } else { | ||
| // Fallback: exclude the current press and backdate | ||
| // idle to the press time. | ||
| keymap_context_without_current_press( | ||
| self.recent_presses, | ||
| self.recent_press_count, | ||
| self.idle_time, | ||
| self.event_scheduler.schedule_counter, | ||
| pressed_modifiers, | ||
| keymap_index, | ||
| ) | ||
| }; |
Owner
Author
There was a problem hiding this comment.
Interesting.
I wonder if this suggests it's worth looking into or rearranging the keymap context handling and how it relates to pending events.
Model: muse-spark-1.2 Agent: Muse Code Co-Authored-By: Muse Code powered by Meta Muse Spark <muse-code@meta.com> Co-Authored-By: muse-spark-1.2 <muse-spark@meta.com>
Model: muse-spark-1.2 Agent: Muse Code Co-Authored-By: Muse Code powered by Meta Muse Spark <muse-code@meta.com> Co-Authored-By: muse-spark-1.2 <muse-spark@meta.com>
rgoulter
force-pushed
the
fix-idle-timeout
branch
from
August 22, 2026 11:19
7c2550f to
e96480a
Compare
Model: muse-spark-1.2 Agent: Muse Code Co-Authored-By: Muse Code powered by Meta Muse Spark <muse-code@meta.com> Co-Authored-By: muse-spark-1.2 <muse-spark@meta.com>
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.
Fixes chorded passthrough inflating tap-hold required_idle/quick_tap.
Fixes timing issue where chorded timeout was effectively added to tap-hold idle check.