summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/teleia/src/state.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/teleia/src/state.rs b/crates/teleia/src/state.rs
index 78aac91..e016411 100644
--- a/crates/teleia/src/state.rs
+++ b/crates/teleia/src/state.rs
@@ -100,6 +100,12 @@ type Timestamp = f64;
#[cfg(target_arch = "wasm32")]
pub type Keycode = winit::keyboard::KeyCode;
+#[cfg(target_arch = "wasm32")]
+impl Display for Keycode {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{:?}", self.kc)
+ }
+}
#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]