Skip to content

Commit

Permalink
Don't repeat key events
Browse files Browse the repository at this point in the history
Handle one event at a time.
Resolves #121.

Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Mar 28, 2024
1 parent 15eabeb commit 31b4c62
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,7 @@ bool ui_run(void)
const ssize_t sz = sizeof(repeats);
if (read(ctx.repeat.fd, &repeats, sz) == sz) {
const uint8_t mods = keybind_mods(ctx.xkb.state);
while (repeats--) {
viewer_on_keyboard(ctx.repeat.key, mods);
}
viewer_on_keyboard(ctx.repeat.key, mods);
}
}

Expand Down

0 comments on commit 31b4c62

Please sign in to comment.