Skip to content

Commit

Permalink
refactor: hold for duration x,f destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed Nov 20, 2024
1 parent 2af0213 commit c690e6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/kanata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1582,12 +1582,11 @@ impl Kanata {
self.waiting_for_idle.insert(*fkd);
}
CustomAction::FakeKeyHoldForDuration(fk_hfd) => {
let x = fk_hfd.coord.x;
let y = fk_hfd.coord.y;
let duration = fk_hfd.hold_duration;
self.vkeys_pending_release.entry(fk_hfd.coord)
.and_modify(|d| *d = duration)
.or_insert_with(|| {
let Coord { x, y } = fk_hfd.coord;
layout.event(Event::Press(x, y));
duration
});
Expand Down

0 comments on commit c690e6f

Please sign in to comment.