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:c06::229; helo=mail-io0-x229.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (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 B83A220355223 for ; Wed, 8 Nov 2017 00:27:05 -0800 (PST) Received: by mail-io0-x229.google.com with SMTP id n137so5103394iod.6 for ; Wed, 08 Nov 2017 00:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=zw6wNWjj2X29isufwNKt8Ar5r6e01B05QuU5rE8biRM=; b=Z6yobvEg4LVjTKsrIByzg1YfKqEzgITEpsVk2huwPCKf4f5GwZybwEpmycdY2Q0qGt ZGOy2mekbKSjRupBOUg5XZf50qmfSNBGFP6yQUrGjYd2G7YIQuikZhOWY0psF31sOjJW ckToB8TZOZeaOtaTaoNdaoYBStH5/OcHUZ1gs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=zw6wNWjj2X29isufwNKt8Ar5r6e01B05QuU5rE8biRM=; b=NV5xEyh7EsOq0O+4bMHuMyav7NzVq+R8yGVX5MGwLywzTKMhnqqeOul5UYmhnFeMrB a7j0hHO/vUJEbZwJW3sywDT7VwQjzRTMErl+PwSLf4DNtk8+6CR67wiw8KWEAsiZLA36 b2VX4wH1rKh0xuSZVzAvBWJhhESHiiH5Po2rYH1qDqUQnwORyuWqOQ4GeDQs0cVNlL58 tJoZfmlUtDWDqN3MpygIM8SUn8LhD8s/h8OgGQQPdY7fXGrqFHJy2cNpd7j8jHw8oJ+Y MOiQIKIglwLm+F3y9BmL6tVn8VddlCHLRemsCTg+WhKwNxR1OKn6lyI15wtfVY/syNLc aodg== X-Gm-Message-State: AJaThX4zweb4MUm5xtC2eifhwqqPVvE2qvAK1yi3s3uAN9A2yJPMjKbf v2fXXGzzuRIwh2u1MiBYeN31UQ== X-Google-Smtp-Source: ABhQp+TOZtCSREB3C6q9YrwnqilGSdGG/9x3u7t7c3zHAqEvwTmMeb9pWR8IYD53lKaApxEwRI2l0Q== X-Received: by 10.107.25.18 with SMTP id 18mr1901101ioz.11.1510129864995; Wed, 08 Nov 2017 00:31:04 -0800 (PST) Received: from [10.189.19.158] ([45.56.152.90]) by smtp.gmail.com with ESMTPSA id n132sm1914282itn.25.2017.11.08.00.31.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 00:31:04 -0800 (PST) To: "Ni, Ruiyu" , "Zeng, Star" , "edk2-devel@lists.01.org" Cc: "Dong, Eric" References: <1958e840-f0fe-6d8e-44d1-03ff9c9dde7b@linaro.org> <0C09AFA07DD0434D9E2A0C6AEB0483103B9B3162@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAB6CB0@SHSMSX104.ccr.corp.intel.com> From: Heyi Guo Message-ID: Date: Wed, 8 Nov 2017 16:30:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BAB6CB0@SHSMSX104.ccr.corp.intel.com> Subject: Re: [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 08:27:05 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 在 11/8/2017 3:55 PM, Ni, Ruiyu 写道: > Heyi, > > If you check the comments below in TerminalConIn.c: > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c#L1319 > > TerminalDxe driver needs to determine whether user wants to press ESC alone, > or press "ESC [ V" for F10 (PCANSI terminal). Do you mean F10 is not directly supported on some terminal tools so that we need to press 3 keys "ESC [ V" quickly and continuously to emulate F10? Thanks, Heyi > > So a 2 second timeout is added to wait additional keys. > > Thanks/Ray > >> -----Original Message----- >> From: Zeng, Star >> Sent: Wednesday, November 8, 2017 3:25 PM >> To: Heyi Guo ; edk2-devel@lists.01.org >> Cc: Ni, Ruiyu ; Dong, Eric ; Zeng, >> Star >> Subject: RE: [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC >> being pressed? >> >> Cc Terminal expert Ray to see if any comments on this. >> >> >> Thanks, >> Star >> -----Original Message----- >> From: Heyi Guo [mailto:heyi.guo@linaro.org] >> Sent: Wednesday, November 8, 2017 3:04 PM >> To: edk2-devel@lists.01.org >> Cc: Zeng, Star ; Dong, Eric >> Subject: [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being >> pressed? >> >> 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