Skip to content

Commit

Permalink
Filter out control characters in type_code
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Dec 18, 2023
1 parent 658d655 commit 17a71d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/code_typer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ pub fn type_code(
) {
let keys = char_events
.read()
// Filter out Escape, Backspace, and Delete
.filter(|ev| !"\u{1b}\u{8}\u{7f}".contains(ev.char))
.count()
.min(keyboard_input.get_just_pressed().count());
if keys == 0 {
Expand Down

0 comments on commit 17a71d1

Please sign in to comment.