public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* override hotkey esc in HII form
@ 2017-03-16 18:19 Jannis Ötjengerdes
  2017-03-20  7:29 ` Dong, Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Jannis Ötjengerdes @ 2017-03-16 18:19 UTC (permalink / raw)
  To: edk2-devel

Hello there,

I'm trying to develop an HII form where which cannot be left by the user
with the hotkey "esc" (escape).

What I've tried:

HotKey.ScanCode = 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
this 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: override hotkey esc in HII form
  2017-03-16 18:19 override hotkey esc in HII form Jannis Ötjengerdes
@ 2017-03-20  7:29 ` Dong, Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Dong, Eric @ 2017-03-20  7:29 UTC (permalink / raw)
  To: Jannis Ötjengerdes, edk2-devel@lists.01.org

Hi Jannis,

The ESC is a scan code predefined in the DisplayEngineDxe driver, display engine use these keys to make itself workable. Details about scan code see below:
SCAN_CODE_TO_SCREEN_OPERATION     gScanCodeToOperation[] = {
  {
    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 Jannis Ötjengerdes
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 with the hotkey "esc" (escape).

What I've tried:

HotKey.ScanCode = 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 this 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-20  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 18:19 override hotkey esc in HII form Jannis Ötjengerdes
2017-03-20  7:29 ` Dong, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox