move lan-mouse protocol into separate crate

This commit is contained in:
Ferdinand Schober
2024-08-06 15:48:33 +02:00
parent fe06ca1fae
commit 1e1476d58e
24 changed files with 437 additions and 530 deletions

View File

@@ -195,9 +195,9 @@ impl InputEmulation {
}
let event = Event::Keyboard(KeyboardEvent::Modifiers {
mods_depressed: 0,
mods_latched: 0,
mods_locked: 0,
depressed: 0,
latched: 0,
locked: 0,
group: 0,
});
self.emulation.consume(event, handle).await?;

View File

@@ -213,7 +213,6 @@ impl<'a> Emulation for LibeiEmulation<'a> {
d.frame(self.serial.load(Ordering::SeqCst), now);
}
}
PointerEvent::Frame {} => {}
},
Event::Keyboard(k) => match k {
KeyboardEvent::Key {
@@ -235,7 +234,6 @@ impl<'a> Emulation for LibeiEmulation<'a> {
}
KeyboardEvent::Modifiers { .. } => {}
},
_ => {}
}
self.context
.flush()

View File

@@ -200,7 +200,6 @@ impl VirtualInput {
.axis_discrete(0, axis, value as f64 / 6., value / 120);
self.pointer.frame();
}
PointerEvent::Frame {} => self.pointer.frame(),
}
self.pointer.frame();
}
@@ -209,16 +208,15 @@ impl VirtualInput {
self.keyboard.key(time, key, state as u32);
}
KeyboardEvent::Modifiers {
mods_depressed,
mods_latched,
mods_locked,
depressed: mods_depressed,
latched: mods_latched,
locked: mods_locked,
group,
} => {
self.keyboard
.modifiers(mods_depressed, mods_latched, mods_locked, group);
}
},
_ => {}
}
Ok(())
}

View File

@@ -123,7 +123,6 @@ impl Emulation for X11Emulation {
PointerEvent::AxisDiscrete120 { axis, value } => {
self.emulate_scroll(axis, value as f64);
}
PointerEvent::Frame {} => {}
},
Event::Keyboard(KeyboardEvent::Key {
time: _,

View File

@@ -108,7 +108,6 @@ impl<'a> Emulation for DesktopPortalEmulation<'a> {
.notify_pointer_axis(&self.session, dx, dy, true)
.await?;
}
PointerEvent::Frame {} => {}
},
Keyboard(k) => {
match k {
@@ -130,7 +129,6 @@ impl<'a> Emulation for DesktopPortalEmulation<'a> {
}
}
}
_ => {}
}
Ok(())
}