use crate::wire::DeviceInput;
#[derive(Debug, Clone, Default)]
pub struct KeyboardInput {
pub modifiers: u8,
pub count: u8,
pub keys: Vec<u8>,
}
impl DeviceInput for KeyboardInput {
fn to_bytes(&self) -> Vec<u8> {
let mut buf = Vec::new();
buf.extend_from_slice(&self.modifiers.to_le_bytes());
buf.extend_from_slice(&self.count.to_le_bytes());
for item in &self.keys {
buf.extend_from_slice(&item.to_le_bytes());
}
buf
}
}