Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6883c22
Fix changelog formatting
vandroiy2013 Aug 3, 2020
179cd72
Bump version
vandroiy2013 Aug 3, 2020
8e1c01b
Fix trackpad not working after sleep
hieplpvip Sep 8, 2020
d25dbb5
Fix spaces
hieplpvip Sep 8, 2020
6bd360b
Sort alphabetically
hieplpvip Sep 8, 2020
2a8868f
Cleanup unused code
hieplpvip Sep 12, 2020
7051549
Fix gestures for trackpad without trackpoint
hieplpvip Sep 13, 2020
0dfacf6
Some cleanup
hieplpvip Sep 13, 2020
91173a7
Rename and reorder functions
hieplpvip Sep 13, 2020
fdaf761
Remove blank line
hieplpvip Sep 13, 2020
15ef9d2
Fix indentations
hieplpvip Sep 13, 2020
d4934c9
Remove TPDN (leftover code from VoodooPS2SynapticsTouchPad)
hieplpvip Sep 13, 2020
d5f0541
Get ACPI notification for brightness keys from GFX0.DD1F/DD02 (#22)
zhen-zen Sep 13, 2020
4a06a8e
Merge branch 'master' of https://github.com/acidanthera/VoodooPS2 int…
hieplpvip Sep 15, 2020
ba1d423
Update credits
hieplpvip Sep 15, 2020
457e3da
Remove unused code
hieplpvip Sep 15, 2020
8af5a9d
Remove unnecessary code & Support scrolling with trackpoint
hieplpvip Sep 15, 2020
6a1b1ab
Don't expose static functions to kernel space
hieplpvip Sep 15, 2020
b58aa01
Cleanup
hieplpvip Sep 15, 2020
f339534
Update credits
hieplpvip Sep 15, 2020
1468814
Handle messages from keyboard
hieplpvip Sep 15, 2020
3341680
Force Touch emulation
hieplpvip Sep 15, 2020
eb52949
Update README
hieplpvip Sep 15, 2020
f53b818
Enable SetHwResolution by default
hieplpvip Sep 15, 2020
03eab8b
Fix typo
hieplpvip Sep 15, 2020
035d962
Linting + cleanup
hieplpvip Sep 15, 2020
81d72b4
Implement hardware v2 support
hieplpvip Sep 15, 2020
650f79a
Implement hardware v1 support
hieplpvip Sep 15, 2020
d9c3ed1
Move elantech_is_buttonpad to cpp file
hieplpvip Sep 15, 2020
99b1b0f
Cleanup
hieplpvip Sep 16, 2020
1c62681
Fix Force Touch emulation
hieplpvip Sep 16, 2020
1416196
Simplify buttonpad check
hieplpvip Sep 16, 2020
605c526
Validate trackpoint packet
hieplpvip Sep 16, 2020
5918f6f
Fix receiving notifications from keyboard
hieplpvip Sep 18, 2020
3a4d715
Ignore input after trackpoint usage
hieplpvip Sep 18, 2020
646f924
Typo
hieplpvip Sep 18, 2020
8354f0d
Fix right button click
hieplpvip Sep 18, 2020
a471041
Improve finger type assignment and thumb detection
hieplpvip Sep 18, 2020
b68c721
Fix thumb detection
hieplpvip Sep 18, 2020
997c3bf
Map both buttons to hardclick for clickpads
hieplpvip Sep 19, 2020
90b8a33
Only log probing info in debug version
hieplpvip Sep 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ xcuserdata
xcshareddata
project.xcworkspace
VoodooInput
Lilu.kext
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ matrix:
compiler: clang

script:
- src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1
- src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" || exit 1
- xcodebuild -configuration Debug
- xcodebuild -configuration Release
Expand All @@ -28,6 +29,7 @@ matrix:
compiler: clang

script:
- src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1
- src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" || exit 1
- xcodebuild analyze -quiet -scheme VoodooPS2Controller -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ]
- xcodebuild analyze -quiet -scheme VoodooPS2Controller -configuration Release CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ]
Expand Down
7 changes: 5 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
VoodooPS2 Changelog
============================
- Fix Command key being pressed after disabling the keyboard and trackpad with Command-PrtScr key combo
- Added a message to allow other kexts to disable the keyboard
#### v2.1.7
- Added ability for native brightness keys discovery with `Lilu` API, please be aware of this new dependecy and drop SSDT modification to corresponding `_QXX`.
- Added constants for 11.0 support

#### v2.1.6
- Upgraded to VoodooInput 1.0.7
- Fixed swiping desktops when holding a dragged item by improving thumb detection
- Fixed keyboard timeout error on some laptop configurations
- Fix Command key being pressed after disabling the keyboard and trackpad with Command-PrtScr key combo
- Added a message to allow other kexts to disable the keyboard

#### v2.1.5
- Upgraded to VoodooInput 1.0.6
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ In addition this kext supports **Force Touch** emulation (*configured in `Info.p
* **Mode 4** (*by @Tarik02*) – pressure is passed to the system using the following formula: ![formula](Docs/force_touch.png)
The parameters in the formula are configured using `ForceTouchCustomUpThreshold`, `ForceTouchCustomDownThreshold` and `ForceTouchCustomPower` keys in `Info.plist` or configuration SSDT. Note that `ForceTouchCustomDownThreshold` is the *upper* limit on the pressure value and vice versa, because it corresponds to the touchpad being fully pressed *down*.

For Elan touchpad, only mode 0 and mode 1 are supported.

## Installation and compilation

For native brightness keys discovery, `Lilu` is required to probe graphics devices.

For VoodooPS2Trackpad.kext to work multitouch interface engine, named VoodooInput.kext, is required.

- For released binaries a compatible version of VoodooInput.kext is already included in the PlugIns directory.
Expand All @@ -55,8 +59,11 @@ In addition, for 2-in-1 systems that do not support disabling the keyboard in ha
* VoodooPS2Controller etc. – turbo, mackerintel, @RehabMan, nhand42, phb, Chunnan, jape, bumby (see RehabMan's repository).
* Magic Trackpad 2 reverse engineering and implementation – https://github.com/alexandred/VoodooI2C project team.
* VoodooPS2Trackpad integration – @kprinssu.
* Force Touch emulation and finger renumbering algorithm** - @usr-sse2.
* Force Touch emulation and finger renumbering algorithm** – @usr-sse2.
* Elan touchpad driver – @BAndysc and @hieplpvip

\* On my touchpad this gesture was practically impossible to perform with the old VoodooPS2Trackpad. Now it works well.

\*\* Due to the limitations of PS/2 bus, Synaptics touchpad reports only the number of fingers and coordinates of two of them to the computer. When there are two fingers on the touchpad and third finger is added, a 'jump' may happen, because the coordinates of one of the fingers are replaced with the coordinates of the added finger. Finger renumbering algorithm estimates the distance from old coordinates to new ones in order to hide this 'jump' from the OS ~~and to calculate approximate position of the 'hidden' finger, in assumption that fingers move together in parallel to each other~~. Now third and fourth fingers are reported at the same position as one of the first two fingers. It allows Launchpad/Show desktop gesture to work more reliably.

\*\*\* The touchpad reports both finger width (ranged from 4 to 15) and pressure (ranged from 0 to 255), but in practice the measured width is almost always 4, and the reported pressure depends more on actual touch width than on actual pressure.
15 changes: 10 additions & 5 deletions VoodooPS2Controller.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
84167814161B55B2002C60E6 /* Products */,
);
sourceTree = "<group>";
usesTabs = 0;
};
84167814161B55B2002C60E6 /* Products */ = {
isa = PBXGroup;
Expand Down Expand Up @@ -301,13 +302,13 @@
356B895D23007F1A0042F30F /* VoodooInput Headers */,
84833FAC161B62A900845294 /* VoodooPS2ALPSGlidePoint.h */,
84833FAB161B62A900845294 /* VoodooPS2ALPSGlidePoint.cpp */,
9828A92E24A2B6C200550FAA /* VoodooPS2Elan.h */,
9828A92D24A2B6C200550FAA /* VoodooPS2Elan.cpp */,
84833FAE161B62A900845294 /* VoodooPS2SentelicFSP.h */,
84833FAD161B62A900845294 /* VoodooPS2SentelicFSP.cpp */,
84833FB0161B62A900845294 /* VoodooPS2SynapticsTouchPad.h */,
84833FAF161B62A900845294 /* VoodooPS2SynapticsTouchPad.cpp */,
84167857161B56C4002C60E6 /* Supporting Files */,
9828A92D24A2B6C200550FAA /* VoodooPS2Elan.cpp */,
9828A92E24A2B6C200550FAA /* VoodooPS2Elan.h */,
);
path = VoodooPS2Trackpad;
sourceTree = "<group>";
Expand Down Expand Up @@ -531,7 +532,7 @@
84167808161B55B2002C60E6 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1140;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = Acidanthera;
};
buildConfigurationList = 8416780B161B55B2002C60E6 /* Build configuration list for PBXProject "VoodooPS2Controller" */;
Expand Down Expand Up @@ -760,6 +761,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++1y";
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
Expand Down Expand Up @@ -805,7 +807,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
"LLVM_LTO[arch=x86_64]" = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MODULE_VERSION = 2.1.6;
MODULE_VERSION = 2.1.7;
ONLY_ACTIVE_ARCH = YES;
"OTHER_LDFLAGS[arch=x86_64]" = "-dead_strip";
PRODUCT_NAME = VoodooPS2Controller;
Expand All @@ -819,6 +821,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++1y";
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
Expand Down Expand Up @@ -857,7 +860,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
"LLVM_LTO[arch=x86_64]" = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MODULE_VERSION = 2.1.6;
MODULE_VERSION = 2.1.7;
"OTHER_LDFLAGS[arch=x86_64]" = "-dead_strip";
PRODUCT_NAME = VoodooPS2Controller;
SDKROOT = macosx;
Expand Down Expand Up @@ -913,6 +916,7 @@
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/VoodooPS2Controller.kext/Contents/PlugIns";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Lilu.kext/Contents/Resources";
INFOPLIST_FILE = "VoodooPS2Keyboard/VoodooPS2Keyboard-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -934,6 +938,7 @@
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/VoodooPS2Controller.kext/Contents/PlugIns";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Lilu.kext/Contents/Resources";
INFOPLIST_FILE = "VoodooPS2Keyboard/VoodooPS2Keyboard-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 10 additions & 0 deletions VoodooPS2Controller/ApplePS2Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@
#define kSC_Delete 0x53 // (extended = gray key)
#define kSC_NumLock 0x45

//
// ACPI message for brightness keys.
//

#define kIOACPIMessageBrightnessCycle 0x85 // Cycle Brightness
#define kIOACPIMessageBrightnessUp 0x86 // Increase Brightness
#define kIOACPIMessageBrightnessDown 0x87 // Decrease Brightness
#define kIOACPIMessageBrightnessZero 0x88 // Zero Brightness
#define kIOACPIMessageBrightnessOff 0x89 // Display Device Off

// name of drivers/services as registered

#define kApplePS2Controller "ApplePS2Controller"
Expand Down
4 changes: 2 additions & 2 deletions VoodooPS2Controller/VoodooPS2Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ UInt8 ApplePS2Controller::readDataPort(PS2DeviceType deviceType)
//

UInt8 readByte;
UInt8 status;
UInt8 status = 0;
UInt32 timeoutCounter = 20000; // (timeoutCounter * kDataDelay = 140 ms)

while (1)
Expand Down Expand Up @@ -1378,7 +1378,7 @@ UInt8 ApplePS2Controller::readDataPort(PS2DeviceType deviceType,
bool firstByteHeld = false;
UInt8 readByte;
bool requestedStream;
UInt8 status;
UInt8 status = 0;
UInt32 timeoutCounter = 10000; // (timeoutCounter * kDataDelay = 70 ms)

while (1)
Expand Down
4 changes: 4 additions & 0 deletions VoodooPS2Keyboard/VoodooPS2Keyboard-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOACPIFamily</key>
<string>1.0.0d1</string>
<key>com.apple.iokit.IOHIDFamily</key>
<string>1.0.0b1</string>
<key>com.apple.kpi.bsd</key>
Expand All @@ -583,6 +585,8 @@
<string>8.0.0</string>
<key>as.acidanthera.voodoo.driver.PS2Controller</key>
<string>${MODULE_VERSION}</string>
<key>as.vit9696.Lilu</key>
<string>1.2.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Console</string>
Expand Down
Loading