Disable keyboard listen

This commit is contained in:
Asura
2022-09-13 01:50:22 -07:00
parent a505b73a56
commit 675e199b35
3 changed files with 8 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ use std::{
ops::{Deref, Not},
sync::{atomic::AtomicBool, mpsc, Arc, Mutex, RwLock},
};
use std::sync::atomic::Ordering;
pub use async_trait::async_trait;
#[cfg(not(any(target_os = "android", target_os = "linux")))]
use cpal::{
@@ -1891,3 +1891,7 @@ fn decode_id_pk(signed: &[u8], key: &sign::PublicKey) -> ResultType<(String, [u8
bail!("Wrong public length");
}
}
pub fn disable_keyboard_listening() {
crate::ui_session_interface::KEYBOARD_HOOKED.store(false, Ordering::SeqCst);
}