From 549a4f3c2f937dde900672ebff6ed605f8c9043d Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 23 Jul 2020 21:06:59 +0200 Subject: Add option "KeyboardInputDelay" in DcsProp to control the minimum delay supported between two key strokes (default is 100 ms) --- Library/PasswordLib/ConsolePassword.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Library/PasswordLib/ConsolePassword.c') diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c index 8588a19..8270290 100644 --- a/Library/PasswordLib/ConsolePassword.c +++ b/Library/PasswordLib/ConsolePassword.c @@ -50,8 +50,9 @@ AskConsolePwdInt( do { key = GetKey(); - // Remove dirty chars 0.1s - FlushInputDelay(100000); + // Remove dirty chars + if (gKeyboardInputDelay) + FlushInputDelay(gKeyboardInputDelay * 1000); if (key.ScanCode == SCAN_ESC) { *retCode = AskPwdRetCancel; -- cgit v1.2.3