keyboard_types/location.rs
1/// The location attribute contains an indication of the logical location
2/// of the key on the device.
3#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
4#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5pub enum Location {
6 /// The key activation MUST NOT be distinguished as the left or right
7 /// version of the key, and (other than the NumLock key) did not
8 /// originate from the numeric keypad (or did not originate with a
9 /// virtual key corresponding to the numeric keypad).
10 Standard = 0x00,
11 /// The key activated originated from the left key location (when there
12 /// is more than one possible location for this key).
13 Left = 0x01,
14 /// The key activation originated from the right key location (when
15 /// there is more than one possible location for this key).
16 Right = 0x02,
17 /// The key activation originated on the numeric keypad or with a virtual
18 /// key corresponding to the numeric keypad (when there is more than one
19 /// possible location for this key). Note that the NumLock key should
20 /// always be encoded with a location of `Location::Standard`.
21 Numpad = 0x03,
22}