Skip to content

Commit

Permalink
refactor: add input processing delay to hold of tap-hold too
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed Nov 30, 2024
1 parent 7edd868 commit a338998
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions keyberon/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,10 @@ impl<'a, const C: usize, const R: usize, T: 'a + Copy + std::fmt::Debug> Layout<
if coord == self.last_press_tracker.coord {
self.last_press_tracker.tap_hold_timeout = 0;
}
// Similar issue happens for the quick tap-hold tap as with on-press release;
// the rapidity of the release can cause issues. See pause_input_processing_delay
// comments for more detail.
self.oneshot.pause_input_processing_ticks = self.oneshot.pause_input_processing_delay;
self.do_action(hold, coord, delay, false, &mut layer_stack.into_iter())
} else {
CustomEvent::NoEvent
Expand Down

0 comments on commit a338998

Please sign in to comment.