Delete pynput from repo

This commit is contained in:
Asura
2022-08-31 23:07:52 -07:00
parent 9999e8864e
commit 37dbfcc86d
25 changed files with 16 additions and 618 deletions

View File

@@ -226,7 +226,6 @@ impl Session {
pub fn send_key_event(&self, mut evt: KeyEvent, keyboard_mode: KeyboardMode) {
// mode: legacy(0), map(1), translate(2), auto(3)
evt.mode = keyboard_mode.into();
dbg!(&evt);
let mut msg_out = Message::new();
msg_out.set_key_event(evt);
self.send(Data::Message(msg_out));

View File

@@ -169,13 +169,6 @@ fn run_cursor(sp: MouseCursorService, state: &mut StateCursor) -> ResultType<()>
lazy_static::lazy_static! {
static ref ENIGO: Arc<Mutex<Enigo>> = {
#[cfg(target_os = "linux")]
{
if crate::platform::is_root() {
std::env::set_var("PYNPUT_USERNAME", crate::platform::linux::get_active_username());
std::env::set_var("PYNPUT_USERID", crate::platform::linux::get_active_userid());
}
}
Arc::new(Mutex::new(Enigo::new()))
};
static ref KEYS_DOWN: Arc<Mutex<HashMap<u64, Instant>>> = Default::default();
@@ -680,7 +673,6 @@ fn map_keyboard_mode(evt: &KeyEvent) {
fn tfc_key_down_or_up(key: Key, down: bool, up: bool) {
if let Key::Layout(chr) = key {
log::info!("tfc_key_down_or_up: {:?}", chr);
if down {
TFC_CONTEXT.lock().unwrap().unicode_char_down(chr);
}
@@ -766,7 +758,6 @@ fn tfc_key_down_or_up(key: Key, down: bool, up: bool) {
}
};
log::info!("tfc_key_down_or_up: {:?}", key);
if down {
TFC_CONTEXT.lock().unwrap().key_down(key);
}

View File

@@ -1106,8 +1106,6 @@ impl Handler {
if let Some(chars) = chars {
for chr in chars {
dbg!(chr);
let mut key_event = KeyEvent::new();
key_event.set_chr(chr as _);
key_event.down = true;