1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use bevy::prelude::ScanCode;
#[cfg(target_family = "wasm")]
mod wasm;
#[cfg(target_family = "wasm")]
pub use wasm::QwertyScanCode;
#[cfg(all(target_os = "macos", not(target_family = "wasm")))]
mod mac_os;
#[cfg(all(target_os = "macos", not(target_family = "wasm")))]
pub use mac_os::QwertyScanCode;
#[cfg(all(target_os = "linux", not(target_os = "macos")))]
mod linux;
#[cfg(all(target_os = "linux", not(target_os = "macos")))]
pub use linux::QwertyScanCode;
#[cfg(all(
not(target_family = "wasm"),
not(target_os = "macos"),
not(target_os = "linux")
))]
mod windows;
#[cfg(all(
not(target_family = "wasm"),
not(target_os = "macos"),
not(target_os = "linux")
))]
pub use windows::QwertyScanCode;
impl From<QwertyScanCode> for ScanCode {
fn from(value: QwertyScanCode) -> Self {
ScanCode(value as u32)
}
}