lighthouse-protocol 6.2.1

Protocol types for Project Lighthouse
Documentation
use serde::{Deserialize, Serialize};

/// A keyboard event.
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
#[serde(rename_all = "camelCase")]
pub struct KeyModifiers {
    /// Whether the alt key is held.
    pub alt: bool,
    /// Whether the ctrl key is held.
    pub ctrl: bool,
    /// Whether the meta key is held.
    pub meta: bool,
    /// Whether the shiftKey key is held.
    pub shift: bool,
}

impl Default for KeyModifiers {
    fn default() -> Self {
        Self {
            alt: false,
            ctrl: false,
            meta: false,
            shift: false,
        }
    }
}