From 9fbca92f377c2146d46ae85a01fe3979c5919ce1 Mon Sep 17 00:00:00 2001 From: Abdelkouddous LHACHIMI Date: Fri, 20 Feb 2026 15:17:07 +0000 Subject: [PATCH] Clear keyboard queue while waiting schedule --- eb_dashboard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eb_dashboard.py b/eb_dashboard.py index 023fdc9..37f0654 100644 --- a/eb_dashboard.py +++ b/eb_dashboard.py @@ -21,7 +21,7 @@ # identification, and support for complex data extraction using JSON path expressions. import json import logging - +import msvcrt import os import re import sys @@ -395,6 +395,9 @@ def wait_for_scheduled_launch(): print(f"\r Starting in {h:02d}:{m:02d}:{s:02d}... (at {target_str}) — Ctrl+C to cancel ", end="", flush=True) sleep(1) + # Flush keyboard buffer to prevent stray keystrokes from polluting subsequent prompts + while msvcrt.kbhit(): + msvcrt.getwch() print() console.print("[green]✓ Starting processing.[/green]") except KeyboardInterrupt: