OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Protocol/AppleKeyMapAggregator.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAppleKeyMapLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcTimerLib.h>
#include <Library/TimerLib.h>
Go to the source code of this file.
Functions | |
VOID | OcFreeKeyRepeatContext (OC_KEY_REPEAT_CONTEXT **Context) |
EFI_STATUS | OcInitKeyRepeatContext (OUT OC_KEY_REPEAT_CONTEXT **Context, IN APPLE_KEY_MAP_AGGREGATOR_PROTOCOL *KeyMap, IN UINTN MaxKeysHeld, IN UINT64 InitialDelay, IN UINT64 SubsequentDelay, IN BOOLEAN PreventInitialRepeat) |
EFI_STATUS EFIAPI | OcGetUpDownKeys (IN OUT OC_KEY_REPEAT_CONTEXT *RepeatContext, OUT APPLE_MODIFIER_MAP *Modifiers, IN OUT UINTN *NumKeysUp, OUT APPLE_KEY_CODE *KeysUp OPTIONAL, IN OUT UINTN *NumKeysDown, OUT APPLE_KEY_CODE *KeysDown OPTIONAL, IN UINT64 CurrentTime) |
AppleKeyMapAggregator edge detection
Copyright (c) 2021, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
Definition in file UpDownDetection.c.
VOID OcFreeKeyRepeatContext | ( | OC_KEY_REPEAT_CONTEXT ** | Context | ) |
Free key repeat context.
[in] | Context | Key repeat context to free. |
Definition at line 21 of file UpDownDetection.c.
EFI_STATUS EFIAPI OcGetUpDownKeys | ( | IN OUT OC_KEY_REPEAT_CONTEXT * | RepeatContext, |
OUT APPLE_MODIFIER_MAP * | Modifiers, | ||
IN OUT UINTN * | NumKeysUp, | ||
OUT APPLE_KEY_CODE *KeysUp | OPTIONAL, | ||
IN OUT UINTN * | NumKeysDown, | ||
OUT APPLE_KEY_CODE *KeysDown | OPTIONAL, | ||
IN UINT64 | CurrentTime ) |
Returns all key transitions and key modifiers into the appropiate buffers.
[in,out] | RepeatContext | On input the previous (or newly initialised) repeat context. On output the newly updated key repeat context; values of interest to the caller are not intended to be read from the context, but from the other parameters above. |
[out] | Modifiers | The key modifiers currently applicable. |
[in,out] | NumKeysUp | On input the number of keys allocated for KeysUp. Ignored if KeysUp is null. On output the number of up keys detected, with their keycodes returned into KeysUp if present. |
[out] | KeysUp | A Pointer to a optional caller-allocated buffer in which new up keycodes get returned. |
[in,out] | NumKeysDown | On input with KeysDown non-null, the number of keys allocated for KeysDown and the total number of keys to check. On input and with KeysDown null, this parameter still represents the total number of keys to check. On output the number of down keys detected, with their keycodes returned into KeysDown if present. |
[out] | KeysDown | A Pointer to an optional caller-allocated buffer in which new down keycodes get returned. |
[in] | CurrentTime | Current time (arbitrary units with sufficient resolution). Need not be valid on initial call only. |
EFI_SUCCESS | The requested key transitions and states have been returned or updated as requested in the various out parameters. |
EFI_UNSUPPORTED | Unsupported buffer/size combination. |
other | An error returned by a sub-operation. |
Definition at line 126 of file UpDownDetection.c.
EFI_STATUS OcInitKeyRepeatContext | ( | OUT OC_KEY_REPEAT_CONTEXT ** | Context, |
IN APPLE_KEY_MAP_AGGREGATOR_PROTOCOL * | KeyMap, | ||
IN UINTN | MaxKeysHeld, | ||
IN UINT64 | InitialDelay, | ||
IN UINT64 | SubsequentDelay, | ||
IN BOOLEAN | PreventInitialRepeat ) |
Initialise key repeat context.
[out] | Context | Allocated key repeat context structure is returned here. |
[in] | KeyMap | The key map aggregator protocol instance to use. |
[in] | MaxKeysHeld | Number of entries to allocate in held keys buffer. |
[in] | InitialDelay | Key repeat initial delay. Same time units as CurrentTime passed to subsequent calls of OcGetUpDownKeys. |
[in] | SubsequentDelay | Key repeat subsequent delay. Same time units as CurrentTime passed to subsequent calls of OcGetUpDownKeys. |
[in] | PreventInitialRepeat | If true, set up buffer so that keys held at init do not repeat until released and then pressed again. |
EFI_SUCCESS | The repeat context has been initialised. |
other | An error returned by a sub-operation. |
Definition at line 41 of file UpDownDetection.c.