From 23d653ac0b6db506d6554f55d8c4faf6f89efdaa Mon Sep 17 00:00:00 2001 From: Nathaniel Simard Date: Thu, 1 Feb 2024 13:56:22 -0500 Subject: [PATCH] Fix training dashboard metrics switch (#1228) --- burn-train/src/renderer/tui/metric_numeric.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/burn-train/src/renderer/tui/metric_numeric.rs b/burn-train/src/renderer/tui/metric_numeric.rs index f124fe3cce..eb44a29d6d 100644 --- a/burn-train/src/renderer/tui/metric_numeric.rs +++ b/burn-train/src/renderer/tui/metric_numeric.rs @@ -109,7 +109,10 @@ impl NumericMetricsState { if let Event::Key(key) = event { match key.kind { KeyEventKind::Release | KeyEventKind::Repeat => (), + #[cfg(target_os = "windows")] // Fix the double toggle on Windows. KeyEventKind::Press => return, + #[cfg(not(target_os = "windows"))] + KeyEventKind::Press => (), } match key.code { KeyCode::Right => self.next_metric(),