pub enum RemoteInput {
MouseMove {
x: u32,
y: u32,
},
MouseButton {
button: MouseButton,
down: bool,
x: u32,
y: u32,
},
MouseWheel {
delta: i32,
horizontal: bool,
},
Key {
vk: u16,
down: bool,
},
Text {
text: String,
},
}Expand description
Backend → agent input event on remote.input.<session_id>.
Coordinates are desktop pixels, not viewer pixels: the SPA scales a 3840x1600 desktop into whatever canvas it has, and letting the endpoint receive viewer-space coordinates would make correctness depend on the browser window size at the far end of a lossy link.
Variants§
MouseMove
MouseButton
Fields
MouseWheel
Fields
Key
A key transition, addressed by Windows virtual-key code.
Deliberately not a character: shortcuts (Ctrl+C, Alt+Tab) are about physical keys, and a character-only channel cannot express them.
Text
Literal text, for IME composition and anything else a virtual-key
stream cannot express. Complements RemoteInput::Key rather than
replacing it — Japanese input is the case that forces this to exist.
Trait Implementations§
Source§impl Clone for RemoteInput
impl Clone for RemoteInput
Source§fn clone(&self) -> RemoteInput
fn clone(&self) -> RemoteInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoteInput
impl Debug for RemoteInput
Source§impl<'de> Deserialize<'de> for RemoteInput
impl<'de> Deserialize<'de> for RemoteInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RemoteInput
impl PartialEq for RemoteInput
Source§impl Serialize for RemoteInput
impl Serialize for RemoteInput
impl StructuralPartialEq for RemoteInput
Auto Trait Implementations§
impl Freeze for RemoteInput
impl RefUnwindSafe for RemoteInput
impl Send for RemoteInput
impl Sync for RemoteInput
impl Unpin for RemoteInput
impl UnsafeUnpin for RemoteInput
impl UnwindSafe for RemoteInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more