diff --git a/EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml b/EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml old mode 100755 new mode 100644 index 6828479..69f9faf Binary files a/EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml and b/EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml differ diff --git a/README.md b/README.md index 5b1e06e..334569c 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/4_README-ACPIpatching.md b/docs/4_README-ACPIpatching.md index 827249a..a1dc3ca 100644 --- a/docs/4_README-ACPIpatching.md +++ b/docs/4_README-ACPIpatching.md @@ -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 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2919f5a..3d533f9 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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. diff --git a/docs/assets/img/fnkeys.png b/docs/assets/img/fnkeys.png new file mode 100644 index 0000000..5737113 Binary files /dev/null and b/docs/assets/img/fnkeys.png differ diff --git a/docs/assets/img/videoproc.png b/docs/assets/img/videoproc.png index 75c5613..59816b4 100644 Binary files a/docs/assets/img/videoproc.png and b/docs/assets/img/videoproc.png differ diff --git a/docs/assets/img/x1c6-hackintosh.png b/docs/assets/img/x1c6-hackintosh.png index f329e45..d72430e 100644 Binary files a/docs/assets/img/x1c6-hackintosh.png and b/docs/assets/img/x1c6-hackintosh.png differ diff --git a/docs/keyboard_map.pdf b/docs/keyboard_map.pdf deleted file mode 100644 index f6c2dc2..0000000 Binary files a/docs/keyboard_map.pdf and /dev/null differ diff --git a/docs/references/ApplePS2ToADBMap.h b/docs/references/ApplePS2ToADBMap.h new file mode 100644 index 0000000..022536e --- /dev/null +++ b/docs/references/ApplePS2ToADBMap.h @@ -0,0 +1,1140 @@ +/* + * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _APPLEPS2TOADBMAP_H +#define _APPLEPS2TOADBMAP_H + +#define PROBOOK + +#define DEADKEY 0x80 + +#if 0 +// These ADB codes are for normal NX key brightness (broken in 10.12) +#define BRIGHTNESS_DOWN 0x91 +#define BRIGHTNESS_UP 0x90 +#else +// These ADB codes are for F14/F15 (works in 10.12) +#define BRIGHTNESS_DOWN 0x6b +#define BRIGHTNESS_UP 0x71 +#endif + +#define ADB_CONVERTER_LEN 256 * 2 // 0x00~0xff : normal key , 0x100~0x1ff : extended key +#define ADB_CONVERTER_EX_START 256 + +// PS/2 scancode reference : USB HID to PS/2 Scan Code Translation Table PS/2 Set 1 columns +// http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf +static const UInt8 PS2ToADBMapStock[ADB_CONVERTER_LEN] = +{ +/* ADB AT ANSI Key-Legend + ======================== */ + DEADKEY,// 00 + 0x35, // 01 Escape + 0x12, // 02 1! + 0x13, // 03 2@ + 0x14, // 04 3# + 0x15, // 05 4$ + 0x17, // 06 5% + 0x16, // 07 6^ + 0x1a, // 08 7& + 0x1c, // 09 8* + 0x19, // 0a 9( + 0x1d, // 0b 0) + 0x1b, // 0c -_ + 0x18, // 0d =+ + 0x33, // 0e Backspace + 0x30, // 0f Tab + 0x0c, // 10 qQ + 0x0d, // 11 wW + 0x0e, // 12 eE + 0x0f, // 13 rR + 0x11, // 14 tT + 0x10, // 15 yY + 0x20, // 16 uU + 0x22, // 17 iI + 0x1f, // 18 oO + 0x23, // 19 pP + 0x21, // 1a [{ + 0x1e, // 1b ]} + 0x24, // 1c Return + 0x3b, // 1d Left Control + 0x00, // 1e aA + 0x01, // 1f sS + 0x02, // 20 dD + 0x03, // 21 fF + 0x05, // 22 gG + 0x04, // 23 hH + 0x26, // 24 jJ + 0x28, // 25 kK + 0x25, // 26 lL + 0x29, // 27 ;: + 0x27, // 28 '" + 0x32, // 29 `~ + 0x38, // 2a Left Shift + 0x2a, // 2b \| , Europe 1(ISO) + 0x06, // 2c zZ + 0x07, // 2d xX + 0x08, // 2e cC + 0x09, // 2f vV + 0x0b, // 30 bB + 0x2d, // 31 nN + 0x2e, // 32 mM + 0x2b, // 33 ,< + 0x2f, // 34 .> + 0x2c, // 35 /? + 0x3c, // 36 Right Shift + 0x43, // 37 Keypad * + 0x3a, // 38 Left Alt + 0x31, // 39 Space + 0x39, // 3a Caps Lock + 0x7a, // 3b F1 + 0x78, // 3c F2 + 0x63, // 3d F3 + 0x76, // 3e F4 + 0x60, // 3f F5 + 0x61, // 40 F6 + 0x62, // 41 F7 + 0x64, // 42 F8 + 0x65, // 43 F9 + 0x6d, // 44 F10 + 0x47, // 45 Num Lock + 0x6b, // 46 Scroll Lock + 0x59, // 47 Keypad 7 Home + 0x5b, // 48 Keypad 8 Up + 0x5c, // 49 Keypad 9 PageUp + 0x4e, // 4a Keypad - + 0x56, // 4b Keypad 4 Left + 0x57, // 4c Keypad 5 + 0x58, // 4d Keypad 6 Right + 0x45, // 4e Keypad + + 0x53, // 4f Keypad 1 End + 0x54, // 50 Keypad 2 Down + 0x55, // 51 Keypad 3 PageDn + 0x52, // 52 Keypad 0 Insert + 0x41, // 53 Keypad . Delete + 0x44, // 54 SysReq + 0x46, // 55 + 0x0a, // 56 Europe 2(ISO) + 0x67, // 57 F11 + 0x6f, // 58 F12 + 0x51, // 59 Keypad = + DEADKEY,// 5a + DEADKEY,// 5b + 0x5f, // 5c Keyboard Int'l 6 (PC9800 Keypad , ) + DEADKEY,// 5d + DEADKEY,// 5e + DEADKEY,// 5f + DEADKEY,// 60 + DEADKEY,// 61 + DEADKEY,// 62 + DEADKEY,// 63 + 0x69, // 64 F13 + 0x6b, // 65 F14 + 0x71, // 66 F15 + 0x6a, // 67 F16 + 0x40, // 68 F17 + 0x4f, // 69 F18 + 0x50, // 6a F19 + 0x5a, // 6b F20 + DEADKEY,// 6c F21 + DEADKEY,// 6d F22 + DEADKEY,// 6e F23 + DEADKEY,// 6f + 0x68, // 70 Keyboard Intl'2 (Japanese Katakana/Hiragana) + DEADKEY,// 71 + DEADKEY,// 72 + 0x5e, // 73 Keyboard Int'l 1 (Japanese Ro) + DEADKEY,// 74 + DEADKEY,// 75 + DEADKEY,// 76 F24 , Keyboard Lang 5 (Japanese Zenkaku/Hankaku) + 0x68, // 77 Keyboard Lang 4 (Japanese Hiragana) + 0x68, // 78 Keyboard Lang 3 (Japanese Katakana) + 0x68, // 79 Keyboard Int'l 4 (Japanese Henkan) + DEADKEY,// 7a + 0x66, // 7b Keyboard Int'l 5 (Japanese Muhenkan) + DEADKEY,// 7c + 0x5d, // 7d Keyboard Int'l 3 (Japanese Yen) + 0x5f, // 7e Keypad , (Brazilian Keypad .) + DEADKEY,// 7f + DEADKEY,// 80 + DEADKEY,// 81 + DEADKEY,// 82 + DEADKEY,// 83 + DEADKEY,// 84 + DEADKEY,// 85 + DEADKEY,// 86 + DEADKEY,// 87 + DEADKEY,// 88 + DEADKEY,// 89 + DEADKEY,// 8a + DEADKEY,// 8b + DEADKEY,// 8c + DEADKEY,// 8d + DEADKEY,// 8e + DEADKEY,// 8f + DEADKEY,// 90 + DEADKEY,// 91 + DEADKEY,// 92 + DEADKEY,// 93 + DEADKEY,// 94 + DEADKEY,// 95 + DEADKEY,// 96 + DEADKEY,// 97 + DEADKEY,// 98 + DEADKEY,// 99 + DEADKEY,// 9a + DEADKEY,// 9b + DEADKEY,// 9c + DEADKEY,// 9d + DEADKEY,// 9e + DEADKEY,// 9f + DEADKEY,// a0 + DEADKEY,// a1 + DEADKEY,// a2 + DEADKEY,// a3 + DEADKEY,// a4 + DEADKEY,// a5 + DEADKEY,// a6 + DEADKEY,// a7 + DEADKEY,// a8 + DEADKEY,// a9 + DEADKEY,// aa + DEADKEY,// ab + DEADKEY,// ac + DEADKEY,// ad + DEADKEY,// ae + DEADKEY,// af + DEADKEY,// b0 + DEADKEY,// b1 + DEADKEY,// b2 + DEADKEY,// b3 + DEADKEY,// b4 + DEADKEY,// b5 + DEADKEY,// b6 + DEADKEY,// b7 + DEADKEY,// b8 + DEADKEY,// b9 + DEADKEY,// ba + DEADKEY,// bb + DEADKEY,// bc + DEADKEY,// bd + DEADKEY,// be + DEADKEY,// bf + DEADKEY,// c0 + DEADKEY,// c1 + DEADKEY,// c2 + DEADKEY,// c3 + DEADKEY,// c4 + DEADKEY,// c5 + DEADKEY,// c6 + DEADKEY,// c7 + DEADKEY,// c8 + DEADKEY,// c9 + DEADKEY,// ca + DEADKEY,// cb + DEADKEY,// cc + DEADKEY,// cd + DEADKEY,// ce + DEADKEY,// cf + DEADKEY,// d0 + DEADKEY,// d1 + DEADKEY,// d2 + DEADKEY,// d3 + DEADKEY,// d4 + DEADKEY,// d5 + DEADKEY,// d6 + DEADKEY,// d7 + DEADKEY,// d8 + DEADKEY,// d9 + DEADKEY,// da + DEADKEY,// db + DEADKEY,// dc + DEADKEY,// dd + DEADKEY,// de + DEADKEY,// df + DEADKEY,// e0 + DEADKEY,// e1 + DEADKEY,// e2 + DEADKEY,// e3 + DEADKEY,// e4 + DEADKEY,// e5 + DEADKEY,// e6 + DEADKEY,// e7 + DEADKEY,// e8 + DEADKEY,// e9 + DEADKEY,// ea + DEADKEY,// eb + DEADKEY,// ec + DEADKEY,// ed + DEADKEY,// ee + DEADKEY,// ef + DEADKEY,// f0 + 0x66, // f1* Keyboard Lang 2 (Korean Hanja) + 0x68, // f2* Keyboard Lang 1 (Korean Hangul) + DEADKEY,// f3 + DEADKEY,// f4 + DEADKEY,// f5 + DEADKEY,// f6 + DEADKEY,// f7 + DEADKEY,// f8 + DEADKEY,// f9 + DEADKEY,// fa + DEADKEY,// fb + DEADKEY,// fc + DEADKEY,// fd + DEADKEY,// fe + DEADKEY,// ff + DEADKEY,// e0 00 + DEADKEY,// e0 01 + DEADKEY,// e0 02 + DEADKEY,// e0 03 + DEADKEY,// e0 04 + BRIGHTNESS_DOWN, // e0 05 dell down + BRIGHTNESS_UP, // e0 06 dell up + DEADKEY,// e0 07 +#ifndef PROBOOK + BRIGHTNESS_UP, // e0 08 samsung up + BRIGHTNESS_DOWN, // e0 09 samsung down +#else + DEADKEY,// e0 08 + 0x83, // e0 09 Launchpad (hp Fn+F6) +#endif + 0xa0, // e0 0a Mission Control (hp Fn+F5) + DEADKEY,// e0 0b + DEADKEY,// e0 0c + DEADKEY,// e0 0d + DEADKEY,// e0 0e + DEADKEY,// e0 0f + 0x4d, // e0 10 Scan Previous Track (hp Fn+F10) + DEADKEY,// e0 11 + BRIGHTNESS_DOWN, // e0 12 hp down (Fn+F2) + DEADKEY,// e0 13 + DEADKEY,// e0 14 + DEADKEY,// e0 15 + DEADKEY,// e0 16 + BRIGHTNESS_UP, // e0 17 hp up (Fn+F3) + DEADKEY,// e0 18 + 0x42, // e0 19 Scan Next Track (hp Fn+F12) + DEADKEY,// e0 1a + DEADKEY,// e0 1b + 0x4c, // e0 1c Keypad Enter + 0x3e, // e0 1d Right Control + DEADKEY,// e0 1e + DEADKEY,// e0 1f + 0x4a, // e0 20 Mute (hp Fn+F7) + DEADKEY,// e0 21 Calculator + 0x34, // e0 22 Play/Pause (hp Fn+F11) + DEADKEY,// e0 23 + DEADKEY,// e0 24 Stop + DEADKEY,// e0 25 + DEADKEY,// e0 26 + DEADKEY,// e0 27 + DEADKEY,// e0 28 + DEADKEY,// e0 29 + DEADKEY,// e0 2a + DEADKEY,// e0 2b + DEADKEY,// e0 2c + DEADKEY,// e0 2d + 0x49, // e0 2e Volume Down (hp Fn+F8) + DEADKEY,// e0 2f + 0x48, // e0 30 Volume Up (hp Fn+F9) + DEADKEY,// e0 31 + DEADKEY,// e0 32 WWW Home + DEADKEY,// e0 33 + DEADKEY,// e0 34 + 0x4b, // e0 35 Keypad / + DEADKEY,// e0 36 + 0x69, // e0 37 Print Screen + 0x3d, // e0 38 Right Alt + DEADKEY,// e0 39 + DEADKEY,// e0 3a + DEADKEY,// e0 3b + DEADKEY,// e0 3c + DEADKEY,// e0 3d + DEADKEY,// e0 3e + DEADKEY,// e0 3f + DEADKEY,// e0 40 + DEADKEY,// e0 41 + DEADKEY,// e0 42 + DEADKEY,// e0 43 + DEADKEY,// e0 44 + 0x71, // e0 45* Pause + DEADKEY,// e0 46* Break(Ctrl-Pause) + 0x73, // e0 47 Home + 0x7e, // e0 48 Up Arrow + 0x74, // e0 49 Page Up + DEADKEY,// e0 4a + 0x7b, // e0 4b Left Arrow + DEADKEY,// e0 4c + 0x7c, // e0 4d Right Arrow + BRIGHTNESS_UP, // e0 4e acer up + 0x77, // e0 4f End + 0x7d, // e0 50 Down Arrow + 0x79, // e0 51 Page Down + 0x92, // e0 52 Insert = Eject + 0x75, // e0 53 Delete + DEADKEY,// e0 54 + DEADKEY,// e0 55 + DEADKEY,// e0 56 + DEADKEY,// e0 57 + DEADKEY,// e0 58 + BRIGHTNESS_UP, // e0 59 acer up for my acer + DEADKEY,// e0 5a + 0x37, // e0 5b Left GUI(Windows) + 0x36, // e0 5c Right GUI(Windows) + 0x6e, // e0 5d App( Windows context menu key ) + 0x7f, // e0 5e System Power / Keyboard Power + DEADKEY,// e0 5f System Sleep (hp Fn+F1) + DEADKEY,// e0 60 + DEADKEY,// e0 61 + DEADKEY,// e0 62 + DEADKEY,// e0 63 System Wake + DEADKEY,// e0 64 + DEADKEY,// e0 65 WWW Search + DEADKEY,// e0 66 WWW Favorites + DEADKEY,// e0 67 WWW Refresh + DEADKEY,// e0 68 WWW Stop + DEADKEY,// e0 69 WWW Forward + DEADKEY,// e0 6a WWW Back + DEADKEY,// e0 6b My Computer + DEADKEY,// e0 6c Mail + DEADKEY,// e0 6d Media Select +#ifndef PROBOOK + BRIGHTNESS_UP, // e0 6e acer up + BRIGHTNESS_DOWN, // e0 6f acer down +#else + 0x70, // e0 6e Video Mirror = hp Fn+F4 + DEADKEY,// e0 6f Fn+Home +#endif + DEADKEY,// e0 70 + DEADKEY,// e0 71 + DEADKEY,// e0 72 + DEADKEY,// e0 73 + DEADKEY,// e0 74 + DEADKEY,// e0 75 + DEADKEY,// e0 76 +#ifndef PROBOOK + BRIGHTNESS_DOWN, // e0 77 lg down + BRIGHTNESS_UP, // e0 78 lg up +#else + DEADKEY,// e0 77 + DEADKEY,// e0 78 WiFi on/off button on HP ProBook +#endif + DEADKEY,// e0 79 + DEADKEY,// e0 7a + DEADKEY,// e0 7b + DEADKEY,// e0 7c + DEADKEY,// e0 7d + DEADKEY,// e0 7e + DEADKEY,// e0 7f + DEADKEY,// e0 80 + DEADKEY,// e0 81 + DEADKEY,// e0 82 + DEADKEY,// e0 83 + DEADKEY,// e0 84 + DEADKEY,// e0 85 + DEADKEY,// e0 86 + DEADKEY,// e0 87 + DEADKEY,// e0 88 + DEADKEY,// e0 89 + DEADKEY,// e0 8a + DEADKEY,// e0 8b + DEADKEY,// e0 8c + DEADKEY,// e0 8d + DEADKEY,// e0 8e + DEADKEY,// e0 8f + DEADKEY,// e0 90 + DEADKEY,// e0 91 + DEADKEY,// e0 92 + DEADKEY,// e0 93 + DEADKEY,// e0 94 + DEADKEY,// e0 95 + DEADKEY,// e0 96 + DEADKEY,// e0 97 + DEADKEY,// e0 98 + DEADKEY,// e0 99 + DEADKEY,// e0 9a + DEADKEY,// e0 9b + DEADKEY,// e0 9c + DEADKEY,// e0 9d + DEADKEY,// e0 9e + DEADKEY,// e0 9f + DEADKEY,// e0 a0 + DEADKEY,// e0 a1 + DEADKEY,// e0 a2 + DEADKEY,// e0 a3 + DEADKEY,// e0 a4 + DEADKEY,// e0 a5 + DEADKEY,// e0 a6 + DEADKEY,// e0 a7 + DEADKEY,// e0 a8 + DEADKEY,// e0 a9 + DEADKEY,// e0 aa + DEADKEY,// e0 ab + DEADKEY,// e0 ac + DEADKEY,// e0 ad + DEADKEY,// e0 ae + DEADKEY,// e0 af + DEADKEY,// e0 b0 + DEADKEY,// e0 b1 + DEADKEY,// e0 b2 + DEADKEY,// e0 b3 + DEADKEY,// e0 b4 + DEADKEY,// e0 b5 + DEADKEY,// e0 b6 + DEADKEY,// e0 b7 + DEADKEY,// e0 b8 + DEADKEY,// e0 b9 + DEADKEY,// e0 ba + DEADKEY,// e0 bb + DEADKEY,// e0 bc + DEADKEY,// e0 bd + DEADKEY,// e0 be + DEADKEY,// e0 bf + DEADKEY,// e0 c0 + DEADKEY,// e0 c1 + DEADKEY,// e0 c2 + DEADKEY,// e0 c3 + DEADKEY,// e0 c4 + DEADKEY,// e0 c5 + DEADKEY,// e0 c6 + DEADKEY,// e0 c7 + DEADKEY,// e0 c8 + DEADKEY,// e0 c9 + DEADKEY,// e0 ca + DEADKEY,// e0 cb + DEADKEY,// e0 cc + DEADKEY,// e0 cd + DEADKEY,// e0 ce + DEADKEY,// e0 cf + DEADKEY,// e0 d0 + DEADKEY,// e0 d1 + DEADKEY,// e0 d2 + DEADKEY,// e0 d3 + DEADKEY,// e0 d4 + DEADKEY,// e0 d5 + DEADKEY,// e0 d6 + DEADKEY,// e0 d7 + DEADKEY,// e0 d8 + DEADKEY,// e0 d9 + DEADKEY,// e0 da + DEADKEY,// e0 db + DEADKEY,// e0 dc + DEADKEY,// e0 dd + DEADKEY,// e0 de + DEADKEY,// e0 df + DEADKEY,// e0 e0 + DEADKEY,// e0 e1 + DEADKEY,// e0 e2 + DEADKEY,// e0 e3 + DEADKEY,// e0 e4 + DEADKEY,// e0 e5 + DEADKEY,// e0 e6 + DEADKEY,// e0 e7 + DEADKEY,// e0 e8 + DEADKEY,// e0 e9 + DEADKEY,// e0 ea + DEADKEY,// e0 eb + DEADKEY,// e0 ec + DEADKEY,// e0 ed + DEADKEY,// e0 ee + DEADKEY,// e0 ef + DEADKEY,// e0 f0 // Note: codes e0f0 through e0ff are reserved for ACPI callback + DEADKEY,// e0 f1 + DEADKEY,// e0 f2 + DEADKEY,// e0 f3 + DEADKEY,// e0 f4 + DEADKEY,// e0 f5 + DEADKEY,// e0 f6 + DEADKEY,// e0 f7 + DEADKEY,// e0 f8 + DEADKEY,// e0 f9 + DEADKEY,// e0 fa + DEADKEY,// e0 fb + DEADKEY,// e0 fc + DEADKEY,// e0 fd + DEADKEY,// e0 fe + DEADKEY // e0 ff // End reserved +}; + +/////////////////////////////////////////////////////////////////////////////////// +// +// +// high-byte of flags are (bit number + 1) for modifier key tracking +// 1: left control +// 2: right control +// 3: left shift +// 4: right shift +// 5: left alt +// 6: right alt +// 7: left windows +// 8: right windows +// 9: left Fn (e0 63 on Lenovo u430) +// 10: windows context menu (usually on right) +// +// low-byte is used for other purposes +// bit 0: breakless bit (set by "PS2 Breakless" +// + +#define kMaskLeftControl 0x0001 +#define kMaskRightControl 0x0002 +#define kMaskLeftShift 0x0004 +#define kMaskRightShift 0x0008 +#define kMaskLeftAlt 0x0010 +#define kMaskRightAlt 0x0020 +#define kMaskLeftWindows 0x0040 +#define kMaskRightWindows 0x0080 +#define kMaskLeftFn 0x0100 +#define kMaskWindowsContext 0x0200 + +static const UInt16 _PS2flagsStock[ADB_CONVERTER_LEN] = +{ + // flags/modifier key AT ANSI Key-Legend + 0x00, // 00 + 0x00, // 01 Escape + 0x00, // 02 1! + 0x00, // 03 2@ + 0x00, // 04 3# + 0x00, // 05 4$ + 0x00, // 06 5% + 0x00, // 07 6^ + 0x00, // 08 7& + 0x00, // 09 8* + 0x00, // 0a 9( + 0x00, // 0b 0) + 0x00, // 0c -_ + 0x00, // 0d =+ + 0x00, // 0e Backspace + 0x00, // 0f Tab + 0x00, // 10 qQ + 0x00, // 11 wW + 0x00, // 12 eE + 0x00, // 13 rR + 0x00, // 14 tT + 0x00, // 15 yY + 0x00, // 16 uU + 0x00, // 17 iI + 0x00, // 18 oO + 0x00, // 19 pP + 0x00, // 1a [{ + 0x00, // 1b ]} + 0x00, // 1c Return + 0x0100, // 1d Left Control + 0x00, // 1e aA + 0x00, // 1f sS + 0x00, // 20 dD + 0x00, // 21 fF + 0x00, // 22 gG + 0x00, // 23 hH + 0x00, // 24 jJ + 0x00, // 25 kK + 0x00, // 26 lL + 0x00, // 27 ;: + 0x00, // 28 '" + 0x00, // 29 `~ + 0x0300, // 2a Left Shift + 0x00, // 2b \| , Europe 1(ISO) + 0x00, // 2c zZ + 0x00, // 2d xX + 0x00, // 2e cC + 0x00, // 2f vV + 0x00, // 30 bB + 0x00, // 31 nN + 0x00, // 32 mM + 0x00, // 33 ,< + 0x00, // 34 .> + 0x00, // 35 /? + 0x0400, // 36 Right Shift + 0x00, // 37 Keypad * + 0x0500, // 38 Left Alt + 0x00, // 39 Space + 0x00, // 3a Caps Lock + 0x00, // 3b F1 + 0x00, // 3c F2 + 0x00, // 3d F3 + 0x00, // 3e F4 + 0x00, // 3f F5 + 0x00, // 40 F6 + 0x00, // 41 F7 + 0x00, // 42 F8 + 0x00, // 43 F9 + 0x00, // 44 F10 + 0x00, // 45 Num Lock + 0x00, // 46 Scroll Lock + 0x00, // 47 Keypad 7 Home + 0x00, // 48 Keypad 8 Up + 0x00, // 49 Keypad 9 PageUp + 0x00, // 4a Keypad - + 0x00, // 4b Keypad 4 Left + 0x00, // 4c Keypad 5 + 0x00, // 4d Keypad 6 Right + 0x00, // 4e Keypad + + 0x00, // 4f Keypad 1 End + 0x00, // 50 Keypad 2 Down + 0x00, // 51 Keypad 3 PageDn + 0x00, // 52 Keypad 0 Insert + 0x00, // 53 Keypad . Delete + 0x00, // 54 SysReq + 0x00, // 55 + 0x00, // 56 Europe 2(ISO) + 0x00, // 57 F11 + 0x00, // 58 F12 + 0x00, // 59 Keypad = + 0x00, // 5a + 0x00, // 5b + 0x00, // 5c Keyboard Int'l 6 (PC9800 Keypad , ) + 0x00, // 5d + 0x00, // 5e + 0x00, // 5f + 0x00, // 60 + 0x00, // 61 + 0x00, // 62 + 0x00, // 63 + 0x00, // 64 F13 + 0x00, // 65 F14 + 0x00, // 66 F15 + 0x00, // 67 F16 + 0x00, // 68 F17 + 0x00, // 69 F18 + 0x00, // 6a F19 + 0x00, // 6b F20 + 0x00, // 6c F21 + 0x00, // 6d F22 + 0x00, // 6e F23 + 0x00, // 6f + 0x00, // 70 Keyboard Intl'2 (Japanese Katakana/Hiragana) + 0x00, // 71 + 0x00, // 72 + 0x00, // 73 Keyboard Int'l 1 (Japanese Ro) + 0x00, // 74 + 0x00, // 75 + 0x00, // 76 F24 , Keyboard Lang 5 (Japanese Zenkaku/Hankaku) + 0x00, // 77 Keyboard Lang 4 (Japanese Hiragana) + 0x00, // 78 Keyboard Lang 3 (Japanese Katakana) + 0x00, // 79 Keyboard Int'l 4 (Japanese Henkan) + 0x00, // 7a + 0x00, // 7b Keyboard Int'l 5 (Japanese Muhenkan) + 0x00, // 7c + 0x00, // 7d Keyboard Int'l 3 (Japanese Yen) + 0x00, // 7e Keypad , (Brazilian Keypad .) + 0x00, // 7f + 0x00, // 80 + 0x00, // 81 + 0x00, // 82 + 0x00, // 83 + 0x00, // 84 + 0x00, // 85 + 0x00, // 86 + 0x00, // 87 + 0x00, // 88 + 0x00, // 89 + 0x00, // 8a + 0x00, // 8b + 0x00, // 8c + 0x00, // 8d + 0x00, // 8e + 0x00, // 8f + 0x00, // 90 + 0x00, // 91 + 0x00, // 92 + 0x00, // 93 + 0x00, // 94 + 0x00, // 95 + 0x00, // 96 + 0x00, // 97 + 0x00, // 98 + 0x00, // 99 + 0x00, // 9a + 0x00, // 9b + 0x00, // 9c + 0x00, // 9d + 0x00, // 9e + 0x00, // 9f + 0x00, // a0 + 0x00, // a1 + 0x00, // a2 + 0x00, // a3 + 0x00, // a4 + 0x00, // a5 + 0x00, // a6 + 0x00, // a7 + 0x00, // a8 + 0x00, // a9 + 0x00, // aa + 0x00, // ab + 0x00, // ac + 0x00, // ad + 0x00, // ae + 0x00, // af + 0x00, // b0 + 0x00, // b1 + 0x00, // b2 + 0x00, // b3 + 0x00, // b4 + 0x00, // b5 + 0x00, // b6 + 0x00, // b7 + 0x00, // b8 + 0x00, // b9 + 0x00, // ba + 0x00, // bb + 0x00, // bc + 0x00, // bd + 0x00, // be + 0x00, // bf + 0x00, // c0 + 0x00, // c1 + 0x00, // c2 + 0x00, // c3 + 0x00, // c4 + 0x00, // c5 + 0x00, // c6 + 0x00, // c7 + 0x00, // c8 + 0x00, // c9 + 0x00, // ca + 0x00, // cb + 0x00, // cc + 0x00, // cd + 0x00, // ce + 0x00, // cf + 0x00, // d0 + 0x00, // d1 + 0x00, // d2 + 0x00, // d3 + 0x00, // d4 + 0x00, // d5 + 0x00, // d6 + 0x00, // d7 + 0x00, // d8 + 0x00, // d9 + 0x00, // da + 0x00, // db + 0x00, // dc + 0x00, // dd + 0x00, // de + 0x00, // df + 0x00, // e0 + 0x00, // e1 + 0x00, // e2 + 0x00, // e3 + 0x00, // e4 + 0x00, // e5 + 0x00, // e6 + 0x00, // e7 + 0x00, // e8 + 0x00, // e9 + 0x00, // ea + 0x00, // eb + 0x00, // ec + 0x00, // ed + 0x00, // ee + 0x00, // ef + 0x00, // f0 + 0x00, // f1* Keyboard Lang 2 (Korean Hanja) + 0x00, // f2* Keyboard Lang 1 (Korean Hangul) + 0x00, // f3 + 0x00, // f4 + 0x00, // f5 + 0x00, // f6 + 0x00, // f7 + 0x00, // f8 + 0x00, // f9 + 0x00, // fa + 0x00, // fb + 0x00, // fc + 0x00, // fd + 0x00, // fe + 0x00, // ff + 0x00, // e0 00 + 0x00, // e0 01 + 0x00, // e0 02 + 0x00, // e0 03 + 0x00, // e0 04 + 0x00, // e0 05 dell down + 0x00, // e0 06 dell up + 0x00, // e0 07 +#ifndef PROBOOK + 0x00, // e0 08 samsung up + 0x00, // e0 09 samsung down +#else + 0x00, // e0 08 + 0x00, // e0 09 Launchpad (hp Fn+F6) +#endif + 0x00, // e0 0a Mission Control (hp Fn+F5) + 0x00, // e0 0b + 0x00, // e0 0c + 0x00, // e0 0d + 0x00, // e0 0e + 0x00, // e0 0f + 0x00, // e0 10 Scan Previous Track (hp Fn+F10) + 0x00, // e0 11 + 0x00, // e0 12 hp down (Fn+F2) + 0x00, // e0 13 + 0x00, // e0 14 + 0x00, // e0 15 + 0x00, // e0 16 + 0x00, // e0 17 hp up (Fn+F3) + 0x00, // e0 18 + 0x00, // e0 19 Scan Next Track (hp Fn+F12) + 0x00, // e0 1a + 0x00, // e0 1b + 0x00, // e0 1c Keypad Enter + 0x0200, // e0 1d Right Control + 0x00, // e0 1e + 0x00, // e0 1f + 0x00, // e0 20 Mute (hp Fn+F7) + 0x00, // e0 21 Calculator + 0x00, // e0 22 Play/Pause (hp Fn+F11) + 0x00, // e0 23 + 0x00, // e0 24 Stop + 0x00, // e0 25 + 0x00, // e0 26 + 0x00, // e0 27 Fn+fkeys/fkeys toggle alternate (default Ctrl+e037) + 0x00, // e0 28 + 0x00, // e0 29 + 0x00, // e0 2a + 0x00, // e0 2b + 0x00, // e0 2c + 0x00, // e0 2d + 0x00, // e0 2e Volume Down (hp Fn+F8) + 0x00, // e0 2f + 0x00, // e0 30 Volume Up (hp Fn+F9) + 0x00, // e0 31 + 0x00, // e0 32 WWW Home + 0x00, // e0 33 + 0x00, // e0 34 + 0x00, // e0 35 Keypad / + 0x00, // e0 36 + 0x00, // e0 37 Print Screen + 0x0600, // e0 38 Right Alt + 0x00, // e0 39 + 0x00, // e0 3a + 0x00, // e0 3b + 0x00, // e0 3c + 0x00, // e0 3d + 0x00, // e0 3e + 0x00, // e0 3f + 0x00, // e0 40 + 0x00, // e0 41 + 0x00, // e0 42 + 0x00, // e0 43 + 0x00, // e0 44 + 0x00, // e0 45* Pause + 0x00, // e0 46* Break(Ctrl-Pause) + 0x00, // e0 47 Home + 0x00, // e0 48 Up Arrow + 0x00, // e0 49 Page Up + 0x00, // e0 4a + 0x00, // e0 4b Left Arrow + 0x00, // e0 4c + 0x00, // e0 4d Right Arrow + 0x00, // e0 4e acer up + 0x00, // e0 4f End + 0x00, // e0 50 Down Arrow + 0x00, // e0 51 Page Down + 0x00, // e0 52 Insert = Eject + 0x00, // e0 53 Delete + 0x00, // e0 54 + 0x00, // e0 55 + 0x00, // e0 56 + 0x00, // e0 57 + 0x00, // e0 58 + 0x00, // e0 59 acer up for my acer + 0x00, // e0 5a + 0x0700, // e0 5b Left GUI(Windows) + 0x0800, // e0 5c Right GUI(Windows) + 0x0a00, // e0 5d App( Windows context menu key ) + 0x00, // e0 5e System Power / Keyboard Power + 0x00, // e0 5f System Sleep (hp Fn+F1) + 0x00, // e0 60 + 0x00, // e0 61 + 0x00, // e0 62 + 0x0900, // e0 63 System Wake (Fn on Lenovo u430) + 0x00, // e0 64 + 0x00, // e0 65 WWW Search + 0x00, // e0 66 WWW Favorites + 0x00, // e0 67 WWW Refresh + 0x00, // e0 68 WWW Stop + 0x00, // e0 69 WWW Forward + 0x00, // e0 6a WWW Back + 0x00, // e0 6b My Computer + 0x00, // e0 6c Mail + 0x00, // e0 6d Media Select +#ifndef PROBOOK + 0x00, // e0 6e acer up + 0x00, // e0 6f acer down +#else + 0x00, // e0 6e Video Mirror = hp Fn+F4 + 0x00, // e0 6f Fn+Home +#endif + 0x00, // e0 70 + 0x00, // e0 71 + 0x00, // e0 72 + 0x00, // e0 73 + 0x00, // e0 74 + 0x00, // e0 75 + 0x00, // e0 76 +#ifndef PROBOOK + 0x00, // e0 77 lg down + 0x00, // e0 78 lg up +#else + 0x00, // e0 77 + 0x00, // e0 78 WiFi on/off button on HP ProBook +#endif + 0x00, // e0 79 + 0x00, // e0 7a + 0x00, // e0 7b + 0x00, // e0 7c + 0x00, // e0 7d + 0x00, // e0 7e + 0x00, // e0 7f + 0x00, // e0 80 + 0x00, // e0 81 + 0x00, // e0 82 + 0x00, // e0 83 + 0x00, // e0 84 + 0x00, // e0 85 + 0x00, // e0 86 + 0x00, // e0 87 + 0x00, // e0 88 + 0x00, // e0 89 + 0x00, // e0 8a + 0x00, // e0 8b + 0x00, // e0 8c + 0x00, // e0 8d + 0x00, // e0 8e + 0x00, // e0 8f + 0x00, // e0 90 + 0x00, // e0 91 + 0x00, // e0 92 + 0x00, // e0 93 + 0x00, // e0 94 + 0x00, // e0 95 + 0x00, // e0 96 + 0x00, // e0 97 + 0x00, // e0 98 + 0x00, // e0 99 + 0x00, // e0 9a + 0x00, // e0 9b + 0x00, // e0 9c + 0x00, // e0 9d + 0x00, // e0 9e + 0x00, // e0 9f + 0x00, // e0 a0 + 0x00, // e0 a1 + 0x00, // e0 a2 + 0x00, // e0 a3 + 0x00, // e0 a4 + 0x00, // e0 a5 + 0x00, // e0 a6 + 0x00, // e0 a7 + 0x00, // e0 a8 + 0x00, // e0 a9 + 0x00, // e0 aa + 0x00, // e0 ab + 0x00, // e0 ac + 0x00, // e0 ad + 0x00, // e0 ae + 0x00, // e0 af + 0x00, // e0 b0 + 0x00, // e0 b1 + 0x00, // e0 b2 + 0x00, // e0 b3 + 0x00, // e0 b4 + 0x00, // e0 b5 + 0x00, // e0 b6 + 0x00, // e0 b7 + 0x00, // e0 b8 + 0x00, // e0 b9 + 0x00, // e0 ba + 0x00, // e0 bb + 0x00, // e0 bc + 0x00, // e0 bd + 0x00, // e0 be + 0x00, // e0 bf + 0x00, // e0 c0 + 0x00, // e0 c1 + 0x00, // e0 c2 + 0x00, // e0 c3 + 0x00, // e0 c4 + 0x00, // e0 c5 + 0x00, // e0 c6 + 0x00, // e0 c7 + 0x00, // e0 c8 + 0x00, // e0 c9 + 0x00, // e0 ca + 0x00, // e0 cb + 0x00, // e0 cc + 0x00, // e0 cd + 0x00, // e0 ce + 0x00, // e0 cf + 0x00, // e0 d0 + 0x00, // e0 d1 + 0x00, // e0 d2 + 0x00, // e0 d3 + 0x00, // e0 d4 + 0x00, // e0 d5 + 0x00, // e0 d6 + 0x00, // e0 d7 + 0x00, // e0 d8 + 0x00, // e0 d9 + 0x00, // e0 da + 0x00, // e0 db + 0x00, // e0 dc + 0x00, // e0 dd + 0x00, // e0 de + 0x00, // e0 df + 0x00, // e0 e0 + 0x00, // e0 e1 + 0x00, // e0 e2 + 0x00, // e0 e3 + 0x00, // e0 e4 + 0x00, // e0 e5 + 0x00, // e0 e6 + 0x00, // e0 e7 + 0x00, // e0 e8 + 0x00, // e0 e9 + 0x00, // e0 ea + 0x00, // e0 eb + 0x00, // e0 ec + 0x00, // e0 ed + 0x00, // e0 ee + 0x00, // e0 ef + 0x00, // e0 f0 // Note: codes e0f0 through e0ff are reserved for ACPI callback + 0x00, // e0 f1 + 0x00, // e0 f2 + 0x00, // e0 f3 + 0x00, // e0 f4 + 0x00, // e0 f5 + 0x00, // e0 f6 + 0x00, // e0 f7 + 0x00, // e0 f8 + 0x00, // e0 f9 + 0x00, // e0 fa + 0x00, // e0 fb + 0x00, // e0 fc + 0x00, // e0 fd + 0x00, // e0 fe + 0x00, // e0 ff // End reserved +}; + +#endif /* !_APPLEPS2TOADBMAP_H */ diff --git a/docs/references/keyboard_map.md b/docs/references/keyboard_map.md new file mode 100644 index 0000000..a99ec44 --- /dev/null +++ b/docs/references/keyboard_map.md @@ -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 | | | | | | | \ No newline at end of file diff --git a/docs/x1c6-Platform_Specifications.pdf b/docs/references/x1c6-Platform_Specifications.pdf similarity index 100% rename from docs/x1c6-Platform_Specifications.pdf rename to docs/references/x1c6-Platform_Specifications.pdf diff --git a/patches/SSDT-Keyboard.dsl b/patches/SSDT-Keyboard.dsl index 4a52ac7..0cbedf1 100644 --- a/patches/SSDT-Keyboard.dsl +++ b/patches/SSDT-Keyboard.dsl @@ -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 }, }, }) diff --git a/patches/SSDT-RMCF-PS2Map-LenovoIWL.dsl b/patches/SSDT-RMCF-PS2Map-LenovoIWL.dsl deleted file mode 100644 index 3c5524b..0000000 --- a/patches/SSDT-RMCF-PS2Map-LenovoIWL.dsl +++ /dev/null @@ -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 \ No newline at end of file