mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Merge pull request #1065 from Jazzzny/betterthanzoe-keyboardfix
Enhancement - Implement injector kext to fix Function Keys on legacy units
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
- Resolve kernel panic on wake for AMD TeraScale 1 and Nvidia Tesla 8000 series GPUs
|
||||
- Resolve graphics corruption on wake for TeraScale 1
|
||||
- Patch currently limited to Ventura and newer
|
||||
- Restore Function Keys on MacBook5,2 and MacBook4,1
|
||||
- Implementation by [@jazzzny](https://github.com/Jazzzny)
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 1.0.1 - release
|
||||
- OpenCorePkg 0.9.2 - release
|
||||
|
||||
@@ -91,6 +91,8 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
|
||||
* Aid with Nvidia Web Driver research and development
|
||||
* [joevt](https://github.com/joevt)
|
||||
* [FixPCIeLinkrate](https://github.com/joevt/joevtApps)
|
||||
* [Jazzzny](https://github.com/Jazzzny)
|
||||
* Research and various contributions to the project
|
||||
* Amazing users who've graciously donate hardware:
|
||||
* [JohnD](https://forums.macrumors.com/members/johnd.53633/) - 2013 Mac Pro
|
||||
* [SpiGAndromeda](https://github.com/SpiGAndromeda) - AMD Vega 64
|
||||
|
||||
@@ -298,7 +298,8 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* Reason: Prevents AVXFSCompressionTypeZlib crash on pre AVX1.0 systems in 12.4+
|
||||
* SimpleMSR
|
||||
* Reason: Disables BD PROCHOT to prevent firmware throttling on Nehalem+ MacBooks
|
||||
|
||||
* LegacyKeyboardInjector
|
||||
* Reason: Fixes function keys on MacBook4,1/MacBook5,2
|
||||
|
||||
|
||||
:::
|
||||
|
||||
@@ -1383,6 +1383,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>LegacyKeyboardInjector.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Legacy Keyboard support for macOS 11+</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string></string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
|
||||
BIN
payloads/Kexts/Misc/LegacyKeyboardInjector-v1.0.0.zip
Normal file
BIN
payloads/Kexts/Misc/LegacyKeyboardInjector-v1.0.0.zip
Normal file
Binary file not shown.
@@ -192,19 +192,20 @@ class BuildMiscellaneous:
|
||||
Trackpad Handler
|
||||
"""
|
||||
|
||||
# Pre-Force Touch trackpad support for macOS Ventura
|
||||
# Pre-Force Touch trackpad & keyboard support for macOS Ventura
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.skylake.value:
|
||||
if self.model.startswith("MacBook"):
|
||||
# These units got force touch early, so ignore them
|
||||
# These units got force touch & the new keyboard mapping early, so ignore them
|
||||
if self.model not in ["MacBookPro11,4", "MacBookPro11,5", "MacBookPro12,1", "MacBook8,1"]:
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTopCase.kext", self.constants.topcase_version, self.constants.top_case_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCButtons.kext")["Enabled"] = True
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path)
|
||||
# Legacy Trackpad support
|
||||
# Legacy Trackpad & Keyboard support
|
||||
if self.model in ["MacBook4,1", "MacBook5,2"]:
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyKeyboardInjector.kext", self.constants.legacy_keyboard, self.constants.legacy_keyboard_path) # Inject legacy personalities into AppleUSBTCKeyboard and AppleUSBTCKeyEventDriver
|
||||
|
||||
|
||||
def _thunderbolt_handling(self) -> None:
|
||||
|
||||
@@ -104,6 +104,9 @@ class Constants:
|
||||
## https://github.com/flagersgit/KDKlessWorkaround
|
||||
self.kdkless_version: str = "1.0.0"
|
||||
|
||||
## Jazzzny
|
||||
self.legacy_keyboard: str = "1.0.0" # LegacyKeyboardInjector - Jazzzny
|
||||
|
||||
# Get resource path
|
||||
self.current_path: Path = Path(__file__).parent.parent.resolve()
|
||||
self.original_path: Path = Path(__file__).parent.parent.resolve()
|
||||
@@ -496,6 +499,10 @@ class Constants:
|
||||
@property
|
||||
def apple_isight_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/LegacyUSBVideoSupport-v{self.apple_isight_version}.zip")
|
||||
|
||||
@property
|
||||
def legacy_keyboard_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/LegacyKeyboardInjector-v{self.legacy_keyboard}.zip")
|
||||
|
||||
@property
|
||||
def apple_raid_path(self):
|
||||
|
||||
Reference in New Issue
Block a user