01 Motivation & Problem

Commercial screen-mirroring apps like Apple Sidecar or Astropad are strictly locked to macOS. Existing open-source VNC or RDP bridges suffer from 40ms–100ms latency and discard crucial pen physics: pressure curves, stylus tilt angles, and geometric palm contact dimensions.

We solved this by developing iPad Sketchpad Pro: an ultra-lean HTML5 client paired with a Python daemon that creates a virtual Linux tablet device using the kernel's /dev/uinput subsystem.

02 High-Frequency PointerEvents

The Safari web client intercepts native Apple Pencil events at 120Hz, packing coordinates into a compact 10-byte binary packet sent over local USB multiplexing:

10-BYTE BINARY PACKET STRUCTURE
[0..1] uint16_t  X coordinate (0-65535 normalized)
[2..3] uint16_t  Y coordinate (0-65535 normalized)
[4..5] uint16_t  Pressure (0-4096 12-bit linear curve)
[6]    int8_t    Tilt Altitude (-90 to +90 deg)
[7]    int8_t    Tilt Azimuth (0 to 360 deg)
[8]    uint8_t   Tool type (0=pen, 1=eraser)
[9]    uint8_t   Checksum XOR

03 Linux Kernel /dev/uinput Bridge

On the Linux host, the daemon registers an absolute pointer device mimicking a Wacom Intuos Pro:

EVTEST — REALTIME PEN INJECTION
$ evtest /dev/input/event19
Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x56a product 0x357 version 0x1 Input device name: "Wacom Intuos Pro Virtual Tablet" Event: time 1726789124.128, type 3 (EV_ABS), code 0 (ABS_X), value 32410 Event: time 1726789124.128, type 3 (EV_ABS), code 1 (ABS_Y), value 18920 Event: time 1726789124.128, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 2840 Event: time 1726789124.128, type 0 (EV_SYN), code 0 (SYN_REPORT), value 0

04 Geometric Palm Rejection

To reject accidental palm rests without sluggish neural-network models, we implemented a geometric aspect-ratio filter: contacts with major axes exceeding 28 CSS pixels or an eccentricity ratio > 2.2 are discarded before dispatch.

05 Latency & Jitter Benchmarks

End-to-end pencil-tip to screen-pixel latency measured using a 240fps high-speed camera:

  • USB Multiplexing (usbmuxd): 1.8ms transport · 8.4ms total display latency
  • Local 5GHz Wi-Fi: 6.2ms transport · 14.1ms total display latency
  • Sample Rate: Solid 120Hz without dropped frames

Launch Live Web Client (pad.harrydev.one) ↗

K
Krish / axe01010
Systems engineer and security researcher. Eight years building and shipping production software directly from mobile Linux environments.
RELATED RESEARCH & BUILDS