1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19

#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq)]
pub struct ModifiersState {
    pub shift: bool,
    pub ctrl: bool,
    pub alt: bool,
    pub logo: bool,
}

impl From<winit::event::ModifiersState> for ModifiersState {
    fn from(state: winit::event::ModifiersState) -> Self {
        Self {
            shift: state.shift(),
            ctrl: state.ctrl(),
            alt: state.alt(),
            logo: state.logo(),
        }
    }
}