From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F22C9803EE for ; Mon, 20 Mar 2017 00:29:25 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 20 Mar 2017 00:29:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,193,1486454400"; d="scan'208";a="77244062" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 20 Mar 2017 00:29:24 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Mar 2017 00:29:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Mar 2017 00:29:24 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Mon, 20 Mar 2017 15:29:22 +0800 From: "Dong, Eric" To: =?iso-8859-1?Q?Jannis_=D6tjengerdes?= , "edk2-devel@lists.01.org" Thread-Topic: [edk2] override hotkey esc in HII form Thread-Index: AQHSnoHsPQdA1bbSw0aZCkho1aboYaGdWGyg Date: Mon, 20 Mar 2017 07:29:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: override hotkey esc in HII form 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: Mon, 20 Mar 2017 07:29:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Jannis, The ESC is a scan code predefined in the DisplayEngineDxe driver, display e= ngine use these keys to make itself workable. Details about scan code see b= elow: SCAN_CODE_TO_SCREEN_OPERATION gScanCodeToOperation[] =3D { { SCAN_UP, // arrow up operation UiUp, }, { SCAN_DOWN, // arrow down operation UiDown, }, { SCAN_PAGE_UP, // page up operation UiPageUp, }, { SCAN_PAGE_DOWN, // page down operation UiPageDown, }, { SCAN_ESC, // exit operation. UiReset, }, { SCAN_LEFT, // arrow left operation. UiLeft, }, { SCAN_RIGHT, // arrow right operation. UiRight, } }; These keys are not supported customize by user. Thanks, Eric -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jann= is =D6tjengerdes Sent: Friday, March 17, 2017 2:20 AM To: edk2-devel@lists.01.org Subject: [edk2] override hotkey esc in HII form Hello there, I'm trying to develop an HII form where which cannot be left by the user wi= th the hotkey "esc" (escape). What I've tried: HotKey.ScanCode =3D SCAN_ESC; FormBrowserEx2->RegisterHotKey(&HotKey, 0, 0, NULL); I tried to override the HotKey with null, so that no action is applied, but= still, the form is closed if I press the esc key. Although I tried to register an exit handler in the FormBrowserEx2, but thi= s function is not even called (I put a endless while loop in it to test it) Lastly I tried to do something in the EFI_BROWSER_ACTION_FORM_CLOSE action,= but all I can do there is to return a value, I tried all EFI_STATUS values= , none of these aborts the cancel request of the form. I would appreciate it, if someone could give me a hint how do it. Thank you! Jannis _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel