Resstore Fn keys on MacBook5,2 and 4,1

This commit is contained in:
Jazzzny
2023-05-18 09:29:09 -04:00
parent 034a30a283
commit 8c848f9317
4 changed files with 27 additions and 3 deletions

View File

@@ -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>

Binary file not shown.

View File

@@ -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:

View File

@@ -53,6 +53,7 @@ class Constants:
self.piixata_version: str = "1.0.1" # AppleIntelPIIXATA
self.fw_kext: str = "1.0.1" # IOFireWireFamily
self.apple_trackpad: str = "1.0.1" # AppleUSBTrackpad
self.legacy_keyboard: str = "1.0.0" # LegacyKeyboardInjector - Jazzzny
self.apple_isight_version: str = "1.0.0" # AppleiSight
self.apple_raid_version: str = "1.0.0" # AppleRAIDCard
self.apfs_zlib_version: str = "12.3.1" # NoAVXFSCompressionTypeZlib
@@ -496,6 +497,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.apple_isight_version}.zip")
@property
def apple_raid_path(self):