OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
AIKTarget.h
Go to the documentation of this file.
1
15#ifndef AIK_TARGET_H
16#define AIK_TARGET_H
17
20#include <Protocol/AmiKeycode.h>
21
22//
23// Maximum amount of keys reported to Apple protocols
24//
25#define AIK_TARGET_BUFFER_SIZE 6
26
27//
28// Known values for key repeat (single key hold):
29// VMware - 2, APTIO V - 3 or 4
30// Known values for different keys (quick press one after other):
31// VMware - 6+, APTIO V - 10+
32// Known values for simultaneous keys (dual key hold):
33// VMware - 2, APTIO V - 1
34//
35
36typedef struct {
37 //
38 // Apple output protocol we submit data to.
39 //
41
42 //
43 // Apple output buffer index
44 //
46
47 //
48 // Apple modifier map (previously reported)
49 //
51
52 //
53 // Previously reported Apple modifiers timestamp
54 //
56
57 //
58 // Previously reported Apple active keys
59 //
61
62 //
63 // Previously reported Apple key timestamps
64 //
65 UINT64 KeyCounters[AIK_TARGET_BUFFER_SIZE];
66
67 //
68 // Amount of active keys previously reported
69 //
71
72 //
73 // Timestamp counter incremented every refresh
74 //
75 UINT64 Counter;
76
77 //
78 // Remove key if it was not submitted after this value.
79 //
82
83EFI_STATUS
85 IN OUT AIK_TARGET *Target,
86 IN UINT8 KeyForgotThreshold
87 );
88
89VOID
91 IN OUT AIK_TARGET *Target
92 );
93
94UINT64
96 IN OUT AIK_TARGET *Target
97 );
98
99VOID
101 IN OUT AIK_TARGET *Target,
102 IN AMI_EFI_KEY_DATA *KeyData
103 );
104
105VOID
107 IN OUT AIK_TARGET *Target
108 );
109
110#endif
#define AIK_TARGET_BUFFER_SIZE
Definition AIKTarget.h:25
VOID AIKTargetSubmit(IN OUT AIK_TARGET *Target)
Definition AIKTarget.c:179
VOID AIKTargetWriteEntry(IN OUT AIK_TARGET *Target, IN AMI_EFI_KEY_DATA *KeyData)
Definition AIKTarget.c:119
UINT64 AIKTargetRefresh(IN OUT AIK_TARGET *Target)
Definition AIKTarget.c:75
EFI_STATUS AIKTargetInstall(IN OUT AIK_TARGET *Target, IN UINT8 KeyForgotThreshold)
Definition AIKTarget.c:23
VOID AIKTargetUninstall(IN OUT AIK_TARGET *Target)
Definition AIKTarget.c:58
APPLE_HID_USAGE APPLE_KEY_CODE
Definition AppleHid.h:317
UINT16 APPLE_MODIFIER_MAP
Definition AppleHid.h:102
APPLE_MODIFIER_MAP Modifiers
Definition AIKTarget.h:50
UINT64 Counter
Definition AIKTarget.h:75
APPLE_KEY_MAP_DATABASE_PROTOCOL * KeyMapDb
Definition AIKTarget.h:40
UINTN NumberOfKeys
Definition AIKTarget.h:70
UINTN KeyMapDbIndex
Definition AIKTarget.h:45
UINT8 KeyForgotThreshold
Definition AIKTarget.h:80
UINT64 ModifierCounter
Definition AIKTarget.h:55