1
0
Fork 0
mirror of https://github.com/tylernguyen/x1c6-hackintosh.git synced 2025-02-05 01:23:14 -06:00

KBD Fn key mapping is done, all keys are now functional

This commit is contained in:
Tyler Nguyen 2020-03-31 19:27:54 -05:00
parent c045855381
commit ad5fa48c4f
No known key found for this signature in database
GPG key ID: DB5B102B914991DA
13 changed files with 1295 additions and 106 deletions

BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml Executable file → Normal file

Binary file not shown.

View file

@ -20,31 +20,25 @@
> ## Update
##### Recent | [Changelog Archive](https://github.com/tylernguyen/x1c6-hackintosh/docs/CHANGELOG.md)
> ### 2020-3-30
> ### 2020-3-31
#### Added
* OpenCore configuration folder intended for install media usage.
* Configuration, patches and documentation for alternative network cards, specifically the DW1560 and DW1820A.
* Further documentation regarding specific tweaks and recommmended macOS settings.
* ADB and PS2 code reference sheet.
#### Changed
* Moved `assets` folder into `docs/`.
#### Deprecated
* All things Clover. OpenCore is now my only friend.
#### Removed
* Removed EC related patches from `config.plist` as they are unnecessary.
* Removed Tools related entries from `config.plist` as they are unnecessary.
* All Fn keys now have have an assigned key, remap as needed.
* Keyboard map is now in markdown.
> ## SUMMARY:
| Fully functional | Non-functional | Semi-functional. Additional pulls needed and welcomed. |
|-------------------------------------------------------------------|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| Wifi and Bluetooth \*need card replacement ⚠️| Fingerprint Reader (not needed, DISABLED at BIOS) ❌| HDMI, currently only outputs at 1080p.Though capable of 4K 4096x2150. ⚠️|
| USB A, USB C, Webcam, Audio Playback/Recording Sleep, Ethernet, Intel Graphics, TrackPoint and Trackpad ✅ | Wireless WAN (DISABLED at BIOS) *ENABLED if you have a 2nd drive connected❌ | Function keys, F1-F6 work. The rest need to be mapped and patched via DSDT/SSDTs. ⚠️|
| WiFi, Bluetooth, Apple Continuity \*need card replacement ⚠️| Fingerprint Reader (not needed, DISABLED at BIOS) ❌| HDMI, currently only outputs at 1080p.Though capable of 4K 4096x2150. ⚠️|
| USB A, USB C, Webcam, Audio Playback/Recording Sleep, Ethernet, Intel Graphics, TrackPoint and Trackpad ✅ | Wireless WAN (DISABLED at BIOS) *ENABLED if you have a 2nd drive connected❌ | Thunderbolt 3 Hotplug: partially working [More details](https://github.com/tylernguyen/x1c6-hackintosh/issues/24#issuecomment-603183002) ⚠️|
| iCloud suite: App Store, iMessage, FaceTime, iCloud Drive, etc... ✅ | Hibernation ❌ | Power management and optimizations. See [Issue #28](https://github.com/tylernguyen/x1c6-hackintosh/issues/28) ⚠️|
| HiDPI, Handoff, Sidecar ✅ | | USB power property injection - unsure of real values. ⚠️|
| MicroSD card reader ✅| | Thunderbolt 3 Hotplug: partially working [More details](https://github.com/tylernguyen/x1c6-hackintosh/issues/24#issuecomment-603183002) ⚠️|
| Since some Fn functions, such as Mic Mute, Network Toggle do not have equivalent in macOS, these keys are assigned F14-F20 which can then be programmed to a preferred shortcut by you. ⚠️ | | USB power property injection - unsure of real values. ⚠️|
| MicroSD card reader ✅| | |
> ## NEEDED:
A macOS machine would be VERY useful: to create install drives, and for when your ThinkPad cannot boot. Though it is not completely necessary.
[Clover Configurator](https://mackie100projects.altervista.org/download-clover-configurator/), if [Clover](https://github.com/Dids/clover-builder) is your bootloader.
Flash drive, 16GB or more.
Xcode works fine, but I prefer [PlistEdit Pro](https://www.fatcatsoftware.com/plisteditpro/).
[MaciASL](https://github.com/acidanthera/MaciASL), for patching ACPI tables.

View file

@ -69,17 +69,22 @@ Used in conjuction with `WhateverGreen.kext`
   - ***SSDT-RTC0-NoFlags for CMOS Reset Patch***
  
> ### SSDT-Keyboard - Remapping Fn and PrtSc Keys
Keyboard path is `\ _SB.PCI0.LPCB.KBD`.  
- Remap 1:
- Remap 2:
- Remap 3:
- Remap 4: F8 (Network) to F18
- Remap 5: F9 (Settings) to F19
- Remap 6: F10 (Bluetooth) to F20
- Remap 7: F11 (Keyboard) to F17
- Remap 8:
- Remap 9:
Keyboard path is `\ _SB.PCI0.LPCB.KBD`.  
For multimedia functions:
- Remap 1: F4 (Network) to F4
- Remap 2: F5 (Brightness Down)
- Remap 3: F6 (Brightness Up)
- Remap 4: F7 (Dual Display) to F16
- Remap 5: F8 (Network) to F8
- Remap 6: F9 (Settings) to F19
- Remap 7: F10 (Bluetooth) to F20
- Remap 8: F11 (Keyboard) to F17
- Remap 9: F12 (Star) to F18
- Remap 10: PrtSc to F13
- Remap 11: Fn + K to Deadkey
- Remap 12: Fn + P to Deadkey
For Fn 1-12 functions, check the follow option within `Preferences/Keyboard`:
![Fn keys](https://github.com/tylernguyen/x1c6-hackintosh/blob/master/docs/assets/img/fnkeys.png)
> ### SSDT-PTSWAK
### SSDT-EXT3-LedReset-TP

View file

@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
> ### 2020-3-31
#### Added
* Further documentation regarding specific tweaks and recommmended macOS settings.
* ADB and PS2 code reference sheet.
#### Changed
* All Fn keys now have have an assigned key, remap as needed.
* Keyboard map is now in markdown.
> ### 2020-3-30
#### Added
* OpenCore configuration folder intended for install media usage.

BIN
docs/assets/img/fnkeys.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 KiB

After

Width:  |  Height:  |  Size: 527 KiB

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,105 @@
| KEY | PS2 Scan Codes | EC Queries | ADB Injected | | | | | | |
|-------------------|----------------|------------|--------------|---|---------|----------------------------|---|---|------------|
| ESC | 1 | | 35 | | | | | | |
| (Fn) ESC | | EC _Q74 | | | | [acidanthera/VoodooPS2](https://github.com/acidanthera/VoodooPS2) *Use Debug version | | | |
| F1 | 3b | | 7a | | | [RehabMan/OS-X-ACPI-Debug](https://github.com/RehabMan/OS-X-ACPI-Debug) | | | |
| F2 | 3c | | 78 | | BIOS: | | | | |
| F3 | 3d | | 63 | | | TrackPoint | | | [Enabled] |
| F4 | 3e | | 76 | | | TrackPad | | | [Enabled] |
| F5 | 3f | | 60 | | | Fn and Ctrl Key Swap | | | [Enabled] |
| F6 | 40 | | 61 | | | Fn Sticky Key | | | [Disabled] |
| F7 | 41 | | 62 | | | F1-F12 as Primary Function | | | [Enabled] |
| F8 | 42 | | 64 | | | | | | |
| F9 | 43 | | 65 | | | | | | |
| F10 | 44 | | 6d | | | | | | |
| F11 | 57 | | 67 | | | | | | |
| F12 | 58 | | 6f | | | | | | |
| (Fn) F1 | e020 | | 4a | | | | | | |
| (Fn) F2 | e02e | | 49 | | | | | | |
| (Fn) F3 | e030 | | 48 | | | | | | |
| (Fn) F4 | | EC _Q6A | | | | | | | |
| (Fn) F5 | | EC _Q15 | | | | | | | |
| (Fn) F6 | | EC _Q14 | | | | | | | |
| (Fn) F7 | | EC _Q16 | | | | | | | |
| (Fn) F8 | | EC _Q64 | | | | | | | |
| (Fn) F9 | | EC _Q66 | | | | | | | |
| (Fn) F10 | | EC _Q60 | | | | | | | |
| (Fn) F11 | | EC _Q61 | | | | | | | |
| (Fn) F12 | | EC _Q62 | | | | | | | |
| Home | e047 | | 73 | | | | | | |
| End | e04f | | 77 | | | | | | |
| Insert | e052 | | 92 | | | | | | |
| Delete | e053 | | 75 | | | | | | |
| ` | 29 | | 32 | | | | | | |
| 1 | 2 | | 12 | | | | | | |
| 2 | 3 | | 13 | | | | | | |
| 3 | 4 | | 14 | | | | | | |
| 4 | 5 | | 15 | | | | | | |
| 5 | 6 | | 17 | | | | | | |
| 6 | 7 | | 16 | | | | | | |
| 7 | 8 | | 1a | | | | | | |
| 8 | 9 | | 1c | | | | | | |
| 9 | a | | 19 | | | | | | |
| 0 | b | | 1d | | | | | | |
| - | c | | 1b | | | | | | |
| Equal/ Plus | d | | 18 | | | | | | |
| Backspace | e | | 33 | | | | | | |
| Tab | f | | 30 | | | | | | |
| Q | 10 | | c | | | | | | |
| W | 11 | | d | | | | | | |
| E | 12 | | e | | | | | | |
| R | 13 | | f | | | | | | |
| T | 14 | | 11 | | | | | | |
| Y | 15 | | 10 | | | | | | |
| U | 16 | | 20 | | | | | | |
| I | 17 | | 22 | | | | | | |
| O | 18 | | 1f | | | | | | |
| P | 19 | | 23 | | | | | | |
| (Fn) P | e045 | | 71 | | | | | | |
| [ | 1a | | 21 | | | | | | |
| ] | 1b | | 1e | | | | | | |
| \ | 2b | | 2a | | | | | | |
| CapsLock | 3a | | 39 | | | | | | |
| A | 1e | | 0 | | | | | | |
| S | 1f | | 1 | | | | | | |
| (Fn) S | 54 | | 44 | | | | | | |
| D | 20 | | 2 | | | | | | |
| F | 21 | | 3 | | | | | | |
| G | 22 | | 5 | | | | | | |
| H | 23 | | 4 | | | | | | |
| J | 24 | | 26 | | | | | | |
| K | 25 | | 28 | | | | | | |
| (Fn) K | 46 | | 6b | | | | | | |
| L | 26 | | 25 | | | | | | |
| ; | 27 | | 29 | | | | | | |
| | 28 | | 27 | | | | | | |
| Enter | 1c | | 24 | | | | | | |
| Left Shift | 2a | | 38 | | | | | | |
| Z | 2c | | 6 | | | | | | |
| X | 2d | | 7 | | | | | | |
| C | 2e | | 8 | | | | | | |
| V | 2f | | 9 | | | | | | |
| B | 30 | | b | | | | | | |
| (Fn) B | 1d | | 3b | | | | | | |
| N | 31 | | 2d | | | | | | |
| M | 32 | | 2e | | | | | | |
| Comma/ < | 33 | | 3b | | | | | | |
| Period/ > | 34 | | 2f | | | | | | |
| / | 35 | | 2c | | | | | | |
| Right Shift | 36 | | 3c | | | | | | |
| Fn | 1d | | 3b | | | | | | |
| Left Control | e063 | | 80 | | | | | | |
| Windows | e05b | | 3a | | | | | | |
| Left Alt | 38 | | 37 | | | | | | |
| Spacebar | 39 | | 31 | | | | | | |
| (Fn) Spacebar | | EC _Q1F | | | | | | | |
| Right Alt | e038 | | 36 | | | | | | |
| Print Screen | e037 | | 0 | | | | | | |
| (Fn) Print Screen | | EC _Q65 | | | | | | | |
| Right Control | e01d | | 3e | | | | | | |
| Page Up: | e049 | | 74 | | | | | | |
| Page Down: | e051 | | 79 | | | | | | |
| Up Arrow: | e048 | | 7e | | | | | | |
| Down Arrow: | e050 | | 7d | | | | | | |
| Left Arrow: | e04b | | 7b | | | | | | |
| Right Arrow: | e04d | | 7c | | | | | | |

View file

@ -1,4 +1,4 @@
DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
DefinitionBlock("", "SSDT", 2, "OCLT", "x1input", 0)
{
External(_SB.PCI0.LPCB.KBD, DeviceObj)
External(_SB.PCI0.LPCB.EC, DeviceObj)
@ -14,7 +14,7 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
Scope (_SB.PCI0.LPCB.EC)
{
Method (_Q6A, 0, NotSerialized) // F4 - Microphone Mute
Method (_Q6A, 0, NotSerialized) // F4 - Microphone Mute = F4
{
If (_OSI ("Darwin"))
{
@ -26,7 +26,7 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q15, 0, NotSerialized) // F5 - Brightness Down
Method (_Q15, 0, NotSerialized) // F5 - Brightness Down = F14
{
If (_OSI ("Darwin"))
{
@ -39,7 +39,7 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q14, 0, NotSerialized) // F6 - Brightness Up
Method (_Q14, 0, NotSerialized) // F6 - Brightness Up = F15
{
If (_OSI ("Darwin"))
{
@ -52,11 +52,11 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q16, 0, NotSerialized) // F7 - Dual Display
Method (_Q16, 0, NotSerialized) // F7 - Dual Display = F16
{
If (_OSI ("Darwin"))
{
Notify(\_SB.PCI0.LPCB.KBD, 0x046E)
Notify(\_SB.PCI0.LPCB.KBD, 0x0367)
}
Else
{
@ -64,11 +64,11 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q64, 0, NotSerialized) // F8 - Network
Method (_Q64, 0, NotSerialized) // F8 - Network = F8
{
If (_OSI ("Darwin"))
{
Notify(\_SB.PCI0.LPCB.KBD, 0x0369)
Notify(\_SB.PCI0.LPCB.KBD, 0x0342)
}
Else
{
@ -76,7 +76,7 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q66, 0, NotSerialized) // F9 - Settings
Method (_Q66, 0, NotSerialized) // F9 - Settings = F19
{
If (_OSI ("Darwin"))
{
@ -88,7 +88,7 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q60, 0, NotSerialized) // F10 - Bluetooh
Method (_Q60, 0, NotSerialized) // F10 - Bluetooh = F20
{
If (_OSI ("Darwin"))
{
@ -100,7 +100,7 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q61, 0, NotSerialized) // F11 - Keyboard
Method (_Q61, 0, NotSerialized) // F11 - Keyboard = F17
{
If (_OSI ("Darwin"))
{
@ -112,11 +112,11 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
}
}
Method (_Q62, 0, NotSerialized) // F12 - Star
Method (_Q62, 0, NotSerialized) // F12 - Star = F18
{
If (_OSI ("Darwin"))
{
Notify(\_SB.PCI0.LPCB.KBD, 0x036C)
Notify(\_SB.PCI0.LPCB.KBD, 0x0369)
}
Else
{
@ -127,51 +127,19 @@ DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
Scope (_SB.PCI0.LPCB.KBD)
{
// Select specific configuration in VoodooPS2Trackpad.kext
Method(_DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return (Package()
{
"RM,oem-id", "LENOVO",
"RM,oem-table-id", "Thinkpad_Clickpad",
})
}
// Overrides (the example data here is default in the Info.plist)
Name(RMCF, Package()
{
"Synaptics TouchPad", Package()
{
"BogusDeltaThreshX", 800,
"BogusDeltaThreshY", 800,
"Clicking", ">y",
"DragLockTempMask", 0x40004,
"DynamicEWMode", ">n",
"FakeMiddleButton", ">n",
"HWResetOnStart", ">y",
//"ForcePassThrough", ">y",
//"SkipPassThrough", ">y",
"PalmNoAction When Typing", ">y",
"ScrollResolution", 800,
"SmoothInput", ">y",
"UnsmoothInput", ">y",
"Thinkpad", ">y",
"EdgeBottom", 0,
"FingerZ", 30,
"MaxTapTime", 100000000,
"MouseMultiplierX", 2,
"MouseMultiplierY", 2,
"MouseScrollMultiplierX", 2,
"MouseScrollMultiplierY", 2,
//"TrackpointScrollYMultiplier", 1, //Change this value to 0xFFFF in order to inverse the vertical scroll direction of the Trackpoint when holding the middle mouse button.
//"TrackpointScrollXMultiplier", 1, //Change this value to 0xFFFF in order to inverse the horizontal scroll direction of the Trackpoint when holding the middle mouse button.
},
"Keyboard", Package()
{
"Custom PS2 Map", Package()
{
Package() { },
"e037=64", // PrtSc=F13
"e037=64", // PrtSc = F13
"46=80", // Fn + K = Deadkey
"e045=80", // Fn + P = Deadkey
// "1d=80", // Fn + B = Deadkey
// "54=80", // Fn + S = Deadkey
},
},
})

View file

@ -1,31 +0,0 @@
//
DefinitionBlock ("", "SSDT", 2, "hack", "RMCF", 0)
{
External(_SB.PCI0.LPCB.KBD, DeviceObj)
Scope (_SB.PCI0.LPCB.KBD)
{
Name (RMCF,Package()
{
"Keyboard", Package()
{
"Custom PS2 Map", Package()
{
Package(){},
"e037=e022"
},
"Custom ADB Map", Package()
{
Package(){},
"46=80",
"e045=80",
"e04e=4d",
"e003=42",
"e04c=6b",
"e054=71"
}
}
})
}
}
//EOF