From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::22d; helo=mail-it0-x22d.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E013E2035521B for ; Tue, 7 Nov 2017 23:00:03 -0800 (PST) Received: by mail-it0-x22d.google.com with SMTP id l196so5318817itl.4 for ; Tue, 07 Nov 2017 23:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=wZhbHMB/0aOtH9f0Bd1xpYvFixaQgT3iGbl+MnIL+B8=; b=NcuCdBsFJQwRZ64zT81/D1z0Ao821taeEbPFAunRX3oyjVaaG2fH36SHKYlKxpa7Mv ILJF/v3jA8gC61Q+qHFXbyAt4NR3G4nnltquFpOW0TNGfM0rnqsOz1K7JRP3jFche69g zI/Z9OrMPFYoGvn5woUkLmUcGF3de1rpbX8+0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=wZhbHMB/0aOtH9f0Bd1xpYvFixaQgT3iGbl+MnIL+B8=; b=Okny/hQnbwX+YoKuyPfdH7U1uVGOGEKfxQbZy09QqwVXrpS5oQL+tLpwiQg2toNJLH YwhuyE4BBN4av/I6Vh4kncuoCaozK08VN/MeZXse1lJpuznuG0FRB2AZ1iWxlictmLOq qIy3HjVXWkb+anLyIWWSrLx8DoAsviwmz0zJw6iF22/77SkSQDy02jjtsrE0ZYMRJLjg yoln9Vq9gmfyrNEw1Ei+1kQjj4RGuVq/itQZS7TS1UTfX2xbcovAKN7Hqkn47LXsE2gu kTTAYu1S1hao9nYXL2OoQVAquI46WZhWaX3DDt2KpiZkIHFHEIF58dNZKjKY7EXdwmnv htGA== X-Gm-Message-State: AJaThX64RqqauiE+yh9sphKEPrKosZgzmuhY3dmkvQGEh1Xbb3tsSOGE veTqH/QM+K9Dhd8gypBoxRt/7A== X-Google-Smtp-Source: ABhQp+Q8roQ9hG6uSswiRAm04k07/w4gQy0LtW/jf0ReHRyxFmfzG8bcRG/S2tfWOkciAMu5uK4pqw== X-Received: by 10.36.189.196 with SMTP id x187mr2396751ite.85.1510124643083; Tue, 07 Nov 2017 23:04:03 -0800 (PST) Received: from [10.189.19.158] ([45.56.152.90]) by smtp.gmail.com with ESMTPSA id 137sm1743159itb.42.2017.11.07.23.04.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 23:04:02 -0800 (PST) To: "edk2-devel@lists.01.org" Cc: "Zeng, Star" , Eric Dong From: Heyi Guo Message-ID: <1958e840-f0fe-6d8e-44d1-03ff9c9dde7b@linaro.org> Date: Wed, 8 Nov 2017 15:04:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Subject: [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being pressed? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2017 07:00:04 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Hi folks, We found ESC key responded fairly slow on serial port terminal, and we think it might be caused by the code in UnicodeToEfiKey in TerminalConIn.c:     if (UnicodeChar == ESC) {       TerminalDevice->InputState = INPUT_STATE_ESC;     }     if (UnicodeChar == CSI) {       TerminalDevice->InputState = INPUT_STATE_CSI;     }     if (TerminalDevice->InputState != INPUT_STATE_DEFAULT) {       Status = gBS->SetTimer(                       TerminalDevice->TwoSecondTimeOut,                       TimerRelative,                       (UINT64)20000000                       );       ASSERT_EFI_ERROR (Status);       continue;     } It seems we intentionally add 2 seconds delay for ESC key press. This provides not so good user experience when we press ESC to exit or cancel some operation. We tried reducing this timeout value to 1 second, then the experience improved much and we didn't find any issue introduced. What's the reason for this timeout value and is there any improvement? Thanks and regards, Heyi