This is an example of how a driver might export data to the HII protocol to be\r
later utilized by the Setup Protocol\r
\r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
BOOLEAN ActionFlag;\r
EFI_STRING ConfigRequestHdr;\r
MY_EFI_VARSTORE_DATA *VarStoreConfig;\r
+ EFI_INPUT_KEY HotKey;\r
+ EFI_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx;\r
\r
//\r
// Initialize the local variables.\r
&mEvent\r
);\r
ASSERT_EFI_ERROR (Status);\r
+\r
+ //\r
+ // Example of how to use BrowserEx protocol to register HotKey.\r
+ // \r
+ Status = gBS->LocateProtocol (&gEfiFormBrowserExProtocolGuid, NULL, (VOID **) &FormBrowserEx);\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // First unregister the default hot key F9 and F10.\r
+ //\r
+ HotKey.UnicodeChar = CHAR_NULL;\r
+ HotKey.ScanCode = SCAN_F9;\r
+ FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL);\r
+ HotKey.ScanCode = SCAN_F10;\r
+ FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL);\r
+ \r
+ //\r
+ // Register the default HotKey F9 and F10 again.\r
+ //\r
+ HotKey.ScanCode = SCAN_F10;\r
+ NewString = HiiGetString (PrivateData->HiiHandle[0], STRING_TOKEN (FUNCTION_TEN_STRING), NULL);\r
+ ASSERT (NewString != NULL);\r
+ FormBrowserEx->RegisterHotKey (&HotKey, BROWSER_ACTION_SUBMIT, 0, NewString);\r
+ HotKey.ScanCode = SCAN_F9;\r
+ NewString = HiiGetString (PrivateData->HiiHandle[0], STRING_TOKEN (FUNCTION_NINE_STRING), NULL);\r
+ ASSERT (NewString != NULL);\r
+ FormBrowserEx->RegisterHotKey (&HotKey, BROWSER_ACTION_DEFAULT, EFI_HII_DEFAULT_CLASS_STANDARD, NewString);\r
+ }\r
+\r
//\r
// In default, this driver is built into Flash device image,\r
// the following code doesn't run.\r
/** @file\r
\r
-Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Protocol/HiiConfigAccess.h>\r
#include <Protocol/HiiDatabase.h>\r
#include <Protocol/HiiString.h>\r
+#include <Protocol/FormBrowserEx.h>\r
\r
#include <Guid/MdeModuleHii.h>\r
#include <Library/DebugLib.h>\r
# This is a sample driver which show how HII protocol, VFR and UNI files are used to\r
# create a driver which can be dipslayed and configured by a UEFI HII Form Browser.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
gEfiFormBrowser2ProtocolGuid ## CONSUMES\r
gEfiHiiDatabaseProtocolGuid ## CONSUMES\r
gEfiSimpleTextInputExProtocolGuid ## CONSUMES\r
-\r
+ gEfiFormBrowserExProtocolGuid ## CONSUMES\r
\r
[Depex]\r
gEfiSimpleTextOutProtocolGuid AND gEfiHiiDatabaseProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid\r