• Stars
    star
    513
  • Rank 86,178 (Top 2 %)
  • Language
    C++
  • License
    Other
  • Created over 5 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VoodooPS2

Build Status Scan Status

New VoodooPS2Trackpad uses VoodooInput's Magic Trackpad II emulation in order to use macOS native driver instead of handling all gestures itself. This enables the use of any from one to four finger gestures defined by Apple including:

  • Look up & data detectors
  • Secondary click (with two fingers, in bottom left corner*, in bottom right corner*)
  • Tap to click
  • Scrolling
  • Zoom in or out
  • Smart zoom
  • Rotate
  • Swipe between pages
  • Swipe between full-screen apps (with three or four fingers)
  • Notification Centre
  • Mission Control (with three or four fingers)
  • App Exposé (with three or four fingers)
  • Dragging with or without drag lock (configured in 'Accessibility'/'Universal Access' prefpane)
  • Three finger drag (configured in 'Accessibility'/'Universal Access' prefpane, may work unreliably**)
  • Launchpad (may work unreliably)
  • Show Desktop (may work unreliably)
  • Screen zoom (configured in 'Accessibility'/'Universal Access' -> Zoom -> Advanced -> Controls -> Use trackpad gesture to zoom)

It also supports BetterTouchTool.

In addition this kext supports Force Touch emulation (configured in Info.plist):

  • Mode 0 – Force Touch emulation is disabled (you can also disable it in System Preferences without setting the mode).
  • Mode 1 – Force Touch emulation using a physical button: on ClickPads (touchpads which have the whole surface clickable (the physical button is inside the laptop under the bottom of touchpad)), the physical button can be remapped to Force Touch. In such mode a tap is a regular click, if Tap to click gesture is enabled in System Preferences, and a click is a Force Touch. This mode is convenient for people who usually tap on the touchpad, not click.
  • Mode 2 – 'wide tap': for Force Touch one needs to increase the area of a finger touching the touchpad***. The necessary width can be set in Info.plist.
  • Mode 3 – pressure value is passed to the system as is; this mode shouldn't be used.
  • Mode 4 (by @Tarik02) – pressure is passed to the system using the following formula: formula
    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.

For ALPS touchpads, V1, V2 and V6 do not support Force Touch. V3, V4 and V5 only support mode 0, 2, 3 and 4. V7 only supports mode 0 and 1. V8 supports all modes.

Installation and compilation

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.

  • For custom compiled versions VoodooInput.kext bootstrapping is required prior to compilation. By default Xcode project will do this automatically. If you prefer to have your own control over the process execute the following command in the project directory to have VoodooInput bootstrapped:

    src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" || exit 1
    

Touchpad and Keyboard Input Toggle

This kext supports disabling touch input by pressing the Printscreen key on your keyboard, or the touchpad disable key on many laptops. Simply press the key to toggle touchpad input off and again to toggle it back on.

In addition, for 2-in-1 systems that do not support disabling the keyboard in hardware while in tablet mode you may toggle keyboard input off and on by holding option(Windows) and pressing the Printscreen key. Repeat the keypress to re-enable keyboard input. These settings are runtime only and do not persist across a reboot.

Credits:

  • 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.
  • Elan touchpad driver – linux kernel contributors, @kprinssu, @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.

More Repositories

1

OpenCorePkg

OpenCore bootloader
C
13,029
star
2

Lilu

Arbitrary kext and process patching on macOS
C
3,585
star
3

AppleALC

Native macOS HD audio for not officially supported codecs
C++
3,439
star
4

WhateverGreen

Various patches necessary for certain ATI/AMD/Intel/Nvidia GPUs
C++
3,236
star
5

VirtualSMC

SMC emulator layer
C++
1,664
star
6

BrcmPatchRAM

C++
1,037
star
7

MaciASL

ACPI editing IDE for macOS
Objective-C
749
star
8

OcBinaryData

733
star
9

NVMeFix

C++
685
star
10

AirportBrcmFixup

An open source kernel extension providing a set of patches required for non-native Airport Broadcom Wi-Fi cards.
C++
643
star
11

MacHyperVSupport

Hyper-V integration support for macOS
C++
620
star
12

AppleSupportPkg

AppleSupportPkg - contains UEFI drivers for Apple environment support
559
star
13

CPUFriend

Dynamic macOS CPU power management data injection
C++
535
star
14

IntelMausi

Intel Ethernet LAN driver for macOS
C
390
star
15

bugtracker

Acidanthera Bugtracker
375
star
16

HibernationFixup

A Lilu plugin intended to fix hibernation compatibility issues
C++
371
star
17

FeatureUnlock

Add Sidecar support to unsupported models
C++
362
star
18

gfxutil

Device Properties conversion tool
C
274
star
19

MacInfoPkg

Mac Platform Information
249
star
20

RestrictEvents

C++
249
star
21

CpuTscSync

It is a Lilu plugin, combining functionality of VoodooTSCSync and disabling xcpm_urgency if TSC is not in sync. It should solve kernel panics after wake.
C++
171
star
22

MacKernelSDK

macOS kernel SDK targeting various XNU versions
C
167
star
23

AptioFixPkg

AptioFixPkg drivers to workaround macOS compatibility with APTIO UEFI FW
161
star
24

Shiki

Protected video playback support and hardware video acceleration on various hardware.
152
star
25

VoodooInput

Generic Multitouch Handler kernel extension for macOS
C++
151
star
26

BrightnessKeys

Handler for brightness keys without DSDT patches
C++
132
star
27

RTCMemoryFixup

open source kernel extension providing a way to emulate some offsets in your CMOS (RTC) memory
C++
97
star
28

macserial

Decode mac serial number
96
star
29

CryptexFixup

Various patches to install Rosetta Cryptex
C++
88
star
30

BT4LEContinuityFixup

72
star
31

OcSupportPkg

OpenCore common libraries
71
star
32

IOJones

Realtime I/O Registry viewer
60
star
33

DebugEnhancer

A Lilu plugin intended to enable debug output in the macOS kernel
C++
58
star
34

audk

Acidanthera UEFI Development Kit based on EDK II edk2-stable202405
C
57
star
35

dmidecode

dmidecode version with macOS specific improvements
C
40
star
36

ocbuild

Shell
39
star
37

EmeraldSDHC

SD host controller support for macOS
C++
39
star
38

OpenCoreShell

Patched UDK Shell adopted for wide firmware range
38
star
39

EfiPkg

38
star
40

UEFIGraphicsFB

UEFI framebuffer driver for macOS
C++
28
star
41

mac-efi-firmware

C
24
star
42

CpuTopologySync

Rebuild asymmetric CPU topology on macOS.
23
star
43

DuetPkg

Duet UEFI firmware emulator
15
star
44

ocmtoc

C
7
star
45

OcLegacyPkg

Legacy OpenCorePkg repository left for historical purposes
7
star