OpenCore
1.0.4
OpenCore Bootloader
|
Go to the source code of this file.
Macros | |
#define | OC_TRACE_TYPING DEBUG_VERBOSE |
#define | OC_TYPING_BUFFER_SIZE 21 |
Typedefs | ||
struct { | ||
APPLE_KEY_CODE AppleKeyCode | ||
CHAR16 UnicodeChar | ||
} | OC_TYPING_BUFFER_ENTRY | |
struct { | ||
OC_TYPING_BUFFER_ENTRY Buffer [OC_TYPING_BUFFER_SIZE] | ||
APPLE_MODIFIER_MAP CurrentModifiers | ||
UINT16 Pad1 | ||
APPLE_EVENT_HANDLE Handle | ||
UINTN Head | ||
UINTN Tail | ||
UINT64 * KeyTimes | ||
} | OC_TYPING_CONTEXT | |
Functions | |
EFI_STATUS | OcRegisterTypingHandler (OUT OC_TYPING_CONTEXT **Context) |
EFI_STATUS | OcUnregisterTypingHandler (IN OC_TYPING_CONTEXT **Context) |
VOID | OcGetNextKeystroke (IN OC_TYPING_CONTEXT *Context, OUT APPLE_MODIFIER_MAP *Modifiers, OUT APPLE_KEY_CODE *AppleKeyCode, OUT CHAR16 *UnicodeChar) |
VOID | OcFlushTypingBuffer (IN OC_TYPING_CONTEXT *Context) |
Copyright (C) 2021, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
Definition in file OcTypingLib.h.
#define OC_TRACE_TYPING DEBUG_VERBOSE |
Definition at line 14 of file OcTypingLib.h.
#define OC_TYPING_BUFFER_SIZE 21 |
Definition at line 32 of file OcTypingLib.h.
typedef PACKED struct { ... } OC_TYPING_BUFFER_ENTRY |
typedef PACKED struct { ... } OC_TYPING_CONTEXT |
VOID OcFlushTypingBuffer | ( | IN OC_TYPING_CONTEXT * | Context | ) |
Flush typing buffer.
[in] | Context | Typing handler context. |
Definition at line 280 of file OcTypingLib.c.
VOID OcGetNextKeystroke | ( | IN OC_TYPING_CONTEXT * | Context, |
OUT APPLE_MODIFIER_MAP * | Modifiers, | ||
OUT APPLE_KEY_CODE * | AppleKeyCode, | ||
OUT CHAR16 * | UnicodeChar ) |
Get next keystroke from typing buffer. Will always return immediately.
[in] | Context | Typing handler context. |
[out] | Modifiers | Current key modifiers, returned even if no key is available. |
[out] | AppleKeyCode | Next keycode if one is available, zero otherwsie. |
[out] | UnicodeChar | Next unicode char if one is available, L'\0' otherwsie. |
Definition at line 223 of file OcTypingLib.c.
EFI_STATUS OcRegisterTypingHandler | ( | OUT OC_TYPING_CONTEXT ** | Context | ) |
Register typing handler with Apple Event protocol.
[out] | Context | Typing handler context. |
EFI_SUCCESS | Registered successfully. |
EFI_OUT_OF_RESOURCES | Could not allocate buffer memory. |
other | An error returned by a sub-operation. |
Definition at line 91 of file OcTypingLib.c.
EFI_STATUS OcUnregisterTypingHandler | ( | IN OC_TYPING_CONTEXT ** | Context | ) |
Unregister typing handler.
[in] | Context | Typing handler context. |
EFI_SUCCESS | Unregistered successfully, or context was already null. |
EFI_NOT_STARTED | Null Apple Event handle present in context. |
other | An error returned by a sub-operation. |
Definition at line 173 of file OcTypingLib.c.
APPLE_KEY_CODE AppleKeyCode |
Definition at line 37 of file OcTypingLib.h.
Definition at line 42 of file OcTypingLib.h.
APPLE_MODIFIER_MAP CurrentModifiers |
Definition at line 43 of file OcTypingLib.h.
APPLE_EVENT_HANDLE Handle |
Definition at line 45 of file OcTypingLib.h.
UINTN Head |
Definition at line 46 of file OcTypingLib.h.
UINT64* KeyTimes |
Definition at line 48 of file OcTypingLib.h.
UINT16 Pad1 |
Definition at line 44 of file OcTypingLib.h.
UINTN Tail |
Definition at line 47 of file OcTypingLib.h.
CHAR16 UnicodeChar |
Definition at line 38 of file OcTypingLib.h.