Merge pull request #25 from ClementTsang/ignore_certain_chars
Skip control characters if they are somehow passed in as a char
This commit is contained in:
commit
2bddfa209a
|
@ -771,6 +771,12 @@ impl App {
|
||||||
|
|
||||||
pub fn on_char_key(&mut self, caught_char: char) {
|
pub fn on_char_key(&mut self, caught_char: char) {
|
||||||
// Forbid any char key presses when showing a dialog box...
|
// Forbid any char key presses when showing a dialog box...
|
||||||
|
|
||||||
|
// Skip control code chars
|
||||||
|
if caught_char.is_control() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if !self.is_in_dialog() {
|
if !self.is_in_dialog() {
|
||||||
let current_key_press_inst = Instant::now();
|
let current_key_press_inst = Instant::now();
|
||||||
if current_key_press_inst
|
if current_key_press_inst
|
||||||
|
|
Loading…
Reference in New Issue