OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
HotKeySupport.c File Reference
#include "BootManagementInternal.h"
#include <Guid/AppleVariable.h>
#include <IndustryStandard/AppleCsrConfig.h>
#include <Protocol/AppleKeyMapAggregator.h>
#include <Protocol/OcBootEntry.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcTimerLib.h>
#include <Library/OcAppleKeyMapLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcConfigurationLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcTemplateLib.h>
#include <Library/OcTypingLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Data Structures

struct  BEP_APPLY_HOTKEYS_CONTEXT
 

Functions

STATIC BOOLEAN EFIAPI CheckHotKeysForProtocolInstance (IN OUT OC_PICKER_CONTEXT *PickerContext, IN EFI_HANDLE BootEntryProtocolHandle, IN OC_BOOT_ENTRY_PROTOCOL *BootEntryProtocol, IN VOID *Context)
 
STATIC EFI_STATUS ApplyBootEntryProtocolHotKeys (IN OUT OC_PICKER_CONTEXT *PickerContext, IN UINTN NumKeys, IN APPLE_MODIFIER_MAP Modifiers, IN APPLE_KEY_CODE *Keys)
 
VOID OcLoadPickerHotKeys (IN OUT OC_PICKER_CONTEXT *Context)
 
STATIC VOID EFIAPI PickerFlushTypingBuffer (IN OUT OC_PICKER_CONTEXT *Context)
 
STATIC VOID EFIAPI GetPickerKeyInfo (IN OUT OC_PICKER_CONTEXT *Context, IN OC_PICKER_KEY_MAP KeyFilter, OUT OC_PICKER_KEY_INFO *PickerKeyInfo)
 
STATIC UINT64 EFIAPI WaitForPickerKeyInfoGetEndTime (IN UINT64 Timeout)
 
STATIC BOOLEAN EFIAPI WaitForPickerKeyInfo (IN OUT OC_PICKER_CONTEXT *Context, IN UINT64 EndTime, IN OC_PICKER_KEY_MAP KeyFilter, IN OUT OC_PICKER_KEY_INFO *PickerKeyInfo)
 
EFI_STATUS OcInitHotKeys (IN OUT OC_PICKER_CONTEXT *Context)
 
VOID OcFreeHotKeys (IN OC_PICKER_CONTEXT *Context)
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.
Copyright (C) 2021, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file HotKeySupport.c.

Function Documentation

◆ ApplyBootEntryProtocolHotKeys()

STATIC EFI_STATUS ApplyBootEntryProtocolHotKeys ( IN OUT OC_PICKER_CONTEXT * PickerContext,
IN UINTN NumKeys,
IN APPLE_MODIFIER_MAP Modifiers,
IN APPLE_KEY_CODE * Keys )

Definition at line 74 of file HotKeySupport.c.

◆ CheckHotKeysForProtocolInstance()

STATIC BOOLEAN EFIAPI CheckHotKeysForProtocolInstance ( IN OUT OC_PICKER_CONTEXT * PickerContext,
IN EFI_HANDLE BootEntryProtocolHandle,
IN OC_BOOT_ENTRY_PROTOCOL * BootEntryProtocol,
IN VOID * Context )

Definition at line 38 of file HotKeySupport.c.

◆ GetPickerKeyInfo()

STATIC VOID EFIAPI GetPickerKeyInfo ( IN OUT OC_PICKER_CONTEXT * Context,
IN OC_PICKER_KEY_MAP KeyFilter,
OUT OC_PICKER_KEY_INFO * PickerKeyInfo )

Definition at line 216 of file HotKeySupport.c.

◆ OcFreeHotKeys()

VOID OcFreeHotKeys ( IN OC_PICKER_CONTEXT * Context)

Free picker keyboard handling resources.

Parameters
[in]ContextPicker context.

Definition at line 812 of file HotKeySupport.c.

◆ OcInitHotKeys()

EFI_STATUS OcInitHotKeys ( IN OUT OC_PICKER_CONTEXT * Context)

Initialise picker keyboard handling. Initialises necessary handlers and updates booter context based on this. Call before looped calls to OcWaitForPickerKeyInfo or OcGetPickerKeyInfo.

Parameters
[in,out]ContextPicker context.
Return values
EFI_SUCCESSThe keyboard handling within the context has been initialised.
EFI_NOT_FOUNDCould not find a required protocol.
otherAn error returned by a sub-operation.

Definition at line 733 of file HotKeySupport.c.

◆ OcLoadPickerHotKeys()

VOID OcLoadPickerHotKeys ( IN OUT OC_PICKER_CONTEXT * Context)

Check pressed hotkeys and update booter context based on this.

Parameters
[in,out]ContextPicker context.

Definition at line 109 of file HotKeySupport.c.

◆ PickerFlushTypingBuffer()

STATIC VOID EFIAPI PickerFlushTypingBuffer ( IN OUT OC_PICKER_CONTEXT * Context)

Definition at line 206 of file HotKeySupport.c.

◆ WaitForPickerKeyInfo()

STATIC BOOLEAN EFIAPI WaitForPickerKeyInfo ( IN OUT OC_PICKER_CONTEXT * Context,
IN UINT64 EndTime,
IN OC_PICKER_KEY_MAP KeyFilter,
IN OUT OC_PICKER_KEY_INFO * PickerKeyInfo )

Definition at line 670 of file HotKeySupport.c.

◆ WaitForPickerKeyInfoGetEndTime()

STATIC UINT64 EFIAPI WaitForPickerKeyInfoGetEndTime ( IN UINT64 Timeout)

Definition at line 656 of file HotKeySupport.c.