mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-03 21:11:28 +03:00
move lan-mouse protocol to separate crate (#178)
This commit is contained in:
committed by
GitHub
parent
fe06ca1fae
commit
19c2c4327f
@@ -1,6 +1,6 @@
|
||||
use crate::config::Config;
|
||||
use futures::StreamExt;
|
||||
use input_capture::{self, CaptureError, InputCapture, InputCaptureError, Position};
|
||||
use input_capture::{self, CaptureError, CaptureEvent, InputCapture, InputCaptureError, Position};
|
||||
use input_event::{Event, KeyboardEvent};
|
||||
use tokio::task::LocalSet;
|
||||
|
||||
@@ -46,7 +46,7 @@ async fn do_capture(input_capture: &mut InputCapture) -> Result<(), CaptureError
|
||||
_ => Position::Bottom,
|
||||
};
|
||||
log::info!("position: {pos}, event: {event}");
|
||||
if let Event::Keyboard(KeyboardEvent::Key { key: 1, .. }) = event {
|
||||
if let CaptureEvent::Input(Event::Keyboard(KeyboardEvent::Key { key: 1, .. })) = event {
|
||||
input_capture.release().await?;
|
||||
break Ok(());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user