diff --git a/.github/workflows/validate-external.yml b/.github/workflows/validate-external.yml
new file mode 100644
index 000000000..440635fef
--- /dev/null
+++ b/.github/workflows/validate-external.yml
@@ -0,0 +1,23 @@
+name: CI - Validation (External)
+
+on:
+ push:
+ workflow_dispatch:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ name: Validate
+ runs-on: macos-latest
+ if: github.repository_owner != 'dortania'
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.10'
+ - name: Install Dependencies
+ run: python3 -m pip install -r requirements.txt
+ - name: Validate
+ run: python3 OpenCore-Patcher-GUI.command --validate
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 1a62e264e..685097e37 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -10,6 +10,7 @@ jobs:
build:
name: Validate
runs-on: x86_64_monterey
+ if: github.repository_owner == 'dortania'
steps:
- uses: actions/checkout@v3
- name: Validate
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80b3752a1..bc355ebc5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
- Backend changes:
- Rename OCLP-Helper to OpenCore-Patcher
- Allows for better identification when displaying prompts
diff --git a/README.md b/README.md
index eb431bc59..b08e0da66 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/docs/PATCHEXPLAIN.md b/docs/PATCHEXPLAIN.md
index 13697930e..5e3d81315 100644
--- a/docs/PATCHEXPLAIN.md
+++ b/docs/PATCHEXPLAIN.md
@@ -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
:::
diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist
index 74a3cfacd..9d0291366 100644
--- a/payloads/Config/config.plist
+++ b/payloads/Config/config.plist
@@ -1383,6 +1383,24 @@
PlistPath
Contents/Info.plist
+
+ Arch
+ x86_64
+ BundlePath
+ LegacyKeyboardInjector.kext
+ Comment
+ Legacy Keyboard support for macOS 11+
+ Enabled
+
+ ExecutablePath
+
+ MaxKernel
+
+ MinKernel
+ 20.0.0
+ PlistPath
+ Contents/Info.plist
+
Arch
x86_64
diff --git a/payloads/Kexts/Misc/LegacyKeyboardInjector-v1.0.0.zip b/payloads/Kexts/Misc/LegacyKeyboardInjector-v1.0.0.zip
new file mode 100644
index 000000000..0a97c68dd
Binary files /dev/null and b/payloads/Kexts/Misc/LegacyKeyboardInjector-v1.0.0.zip differ
diff --git a/resources/build/misc.py b/resources/build/misc.py
index 7a57065a0..9bf332cdf 100644
--- a/resources/build/misc.py
+++ b/resources/build/misc.py
@@ -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:
diff --git a/resources/constants.py b/resources/constants.py
index 2216a686d..c5946e969 100644
--- a/resources/constants.py
+++ b/resources/constants.py
@@ -105,6 +105,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()
@@ -497,6 +500,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):