# saffroncarp1106/otd-touchpad-support architecture

> Architecture diagram of the GitHub repository saffroncarp1106/otd-touchpad-support, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saffroncarp1106/otd-touchpad-support
- Repository: https://github.com/saffroncarp1106/otd-touchpad-support

## Overview

OTD-TouchPad-Support adds touchpad input to OpenTabletDriver, with absolute-mode mapping and configurable tablet/display areas as its main user workflow. The README also describes device selection and probing on Windows, a debugger that captures device and daemon reports, and experimental Linux support. The graph includes the documented workflow and major OTD runtime layers. Source excerpts are incomplete, so only documented or indexed relationships are connected; several subsystems are shown without speculative wiring.

Main entry points: [`upstream/OpenTabletDriver.UX/App.cs`](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.UX/App.cs) (Desktop UI), [`upstream/OpenTabletDriver.Daemon/DriverDaemon.cs`](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Daemon/DriverDaemon.cs) (Driver Daemon), [`tools/TouchpadProbe/Program.cs`](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/TouchpadProbe/Program.cs) (Touchpad Probe), [`upstream/OpenTabletDriver/Instance.cs`](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Instance.cs) (Driver Instance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_touchpad["Touchpad Support"]
  node_probe["Touchpad Probe<br/>[Program.cs]"]
  node_liveprobe["Live Probe<br/>[live_touchpad.py]"]
  node_deviceinfo["Touchpad Info<br/>[touchpad_info.py]"]
  node_rateviewer["Rate Viewer<br/>[analyze_rate.py]"]
  node_viewer["Touchpad Viewer<br/>[touchpad_viewer.py]"]
  node_linuxprobe["Linux Probe<br/>[live_touchpad.py]"]
end

subgraph group_driver["OTD Driver"]
  node_driver["Device Detection<br/>[Driver.cs]"]
  node_config["Device Configurations"]
  node_parsers["Report Parsers"]
  node_pipeline["Output Pipeline<br/>[PipelineManager.cs]"]
  node_daemon["Driver Daemon<br/>[DriverDaemon.cs]"]
  node_instance["Driver Instance<br/>[Instance.cs]"]
end

subgraph group_desktop["Desktop Configuration"]
  node_ui["Desktop UI<br/>[App.cs]"]
  node_settings["Settings<br/>[Settings.cs]"]
  node_profiles["Profiles<br/>[Profile.cs]"]
  node_pluginmanager["Plugin Manager<br/>[PluginManager.cs]"]
  node_plugininstall["Plugin Install"]
end

subgraph group_platform["Platform Input"]
  node_windowsinterop["Windows Interop<br/>[Windows.cs]"]
  node_linuxdevice["Linux Touchpad<br/>[LinuxTouchpad.cs]"]
  node_macdevice["Mac Touchpad<br/>[MacTouchpad.cs]"]
  node_log["Logging<br/>[Log.cs]"]
  node_appinfo["App Paths<br/>[AppInfo.cs]"]
  node_serialization["Serialization<br/>[Serialization.cs]"]
  node_systeminterop["Platform Detection<br/>[SystemInterop.cs]"]
end

node_user(("User"))

node_user -->|"runs probe"| node_probe
node_user -->|"inspects device"| node_deviceinfo
node_user -->|"configures mapping"| node_ui
node_user -.->|"runs probe"| node_linuxprobe
node_probe -->|"reads touch data"| node_macdevice
node_ui -->|"uses settings"| node_settings
node_settings -->|"stores profiles"| node_profiles
node_daemon -->|"hosts driver"| node_driver
node_daemon -->|"registers provider"| node_config
node_daemon -->|"registers provider"| node_parsers
node_ui -->|"accesses driver"| node_instance
node_instance -->|"installs plugins"| node_plugininstall
node_plugininstall -->|"loads plugins"| node_pluginmanager
node_ui -->|"uses native APIs"| node_windowsinterop
node_appinfo -->|"selects platform paths"| node_systeminterop

click node_probe "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/TouchpadProbe/Program.cs"
click node_liveprobe "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/diagnostics/live_touchpad.py"
click node_deviceinfo "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/diagnostics/touchpad_info.py"
click node_rateviewer "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/viewer/analyze_rate.py"
click node_viewer "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/viewer/touchpad_viewer.py"
click node_linuxprobe "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/linux/live_touchpad.py"
click node_driver "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Driver.cs"
click node_config "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Configurations/DeviceConfigurationProvider.cs"
click node_parsers "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Configurations/ReportParserProvider.cs"
click node_pipeline "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Plugin/Output/PipelineManager.cs"
click node_daemon "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Daemon/DriverDaemon.cs"
click node_ui "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.UX/App.cs"
click node_settings "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Settings.cs"
click node_profiles "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Profiles/Profile.cs"
click node_pluginmanager "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Reflection/PluginManager.cs"
click node_plugininstall "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Reflection/DesktopPluginManager.cs"
click node_windowsinterop "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Native/Windows/Windows.cs"
click node_linuxdevice "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Devices/LinuxTouchpad/LinuxTouchpad.cs"
click node_macdevice "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Devices/AsusTouchpad/MacTouchpad.cs"
click node_log "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Plugin/Log.cs"
click node_appinfo "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/AppInfo.cs"
click node_serialization "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Serialization.cs"
click node_systeminterop "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Interop/SystemInterop.cs"
click node_instance "https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Instance.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_probe,node_liveprobe,node_deviceinfo,node_rateviewer,node_viewer,node_linuxprobe,node_user toneBlue
class node_driver,node_config,node_parsers,node_pipeline,node_daemon,node_instance toneAmber
class node_ui,node_settings,node_profiles,node_pluginmanager,node_plugininstall toneMint
class node_windowsinterop,node_linuxdevice,node_macdevice,node_log,node_appinfo,node_serialization,node_systeminterop toneRose
```

## Components

### Touchpad Support

- [Touchpad Probe](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/TouchpadProbe/Program.cs): `tools/TouchpadProbe/Program.cs`
- [Live Probe](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/diagnostics/live_touchpad.py): `tools/diagnostics/live_touchpad.py`
- [Touchpad Info](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/diagnostics/touchpad_info.py): `tools/diagnostics/touchpad_info.py`
- [Rate Viewer](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/viewer/analyze_rate.py): `tools/viewer/analyze_rate.py`
- [Touchpad Viewer](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/tools/viewer/touchpad_viewer.py): `tools/viewer/touchpad_viewer.py`
- [Linux Probe](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/linux/live_touchpad.py): `linux/live_touchpad.py`

### OTD Driver

- [Device Detection](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Driver.cs): `upstream/OpenTabletDriver/Driver.cs`
- [Device Configurations](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Configurations/DeviceConfigurationProvider.cs): `upstream/OpenTabletDriver.Configurations/DeviceConfigurationProvider.cs`
- [Report Parsers](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Configurations/ReportParserProvider.cs): `upstream/OpenTabletDriver.Configurations/ReportParserProvider.cs`
- [Output Pipeline](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Plugin/Output/PipelineManager.cs): `upstream/OpenTabletDriver.Plugin/Output/PipelineManager.cs`
- [Driver Daemon](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Daemon/DriverDaemon.cs): `upstream/OpenTabletDriver.Daemon/DriverDaemon.cs`
- [Driver Instance](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Instance.cs): `upstream/OpenTabletDriver/Instance.cs`

### Desktop Configuration

- [Desktop UI](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.UX/App.cs): `upstream/OpenTabletDriver.UX/App.cs`
- [Settings](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Settings.cs): `upstream/OpenTabletDriver.Desktop/Settings.cs`
- [Profiles](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Profiles/Profile.cs): `upstream/OpenTabletDriver.Desktop/Profiles/Profile.cs`
- [Plugin Manager](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Reflection/PluginManager.cs): `upstream/OpenTabletDriver.Desktop/Reflection/PluginManager.cs`
- [Plugin Install](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Reflection/DesktopPluginManager.cs): `upstream/OpenTabletDriver.Desktop/Reflection/DesktopPluginManager.cs`

### Platform Input

- [Windows Interop](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Native/Windows/Windows.cs): `upstream/OpenTabletDriver.Native/Windows/Windows.cs`
- [Linux Touchpad](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Devices/LinuxTouchpad/LinuxTouchpad.cs): `upstream/OpenTabletDriver/Devices/LinuxTouchpad/LinuxTouchpad.cs`
- [Mac Touchpad](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Devices/AsusTouchpad/MacTouchpad.cs): `upstream/OpenTabletDriver/Devices/AsusTouchpad/MacTouchpad.cs`
- [Logging](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Plugin/Log.cs): `upstream/OpenTabletDriver.Plugin/Log.cs`
- [App Paths](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/AppInfo.cs): `upstream/OpenTabletDriver.Desktop/AppInfo.cs`
- [Serialization](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver.Desktop/Serialization.cs): `upstream/OpenTabletDriver.Desktop/Serialization.cs`
- [Platform Detection](https://github.com/saffroncarp1106/otd-touchpad-support/blob/TouchPad-OTD/upstream/OpenTabletDriver/Interop/SystemInterop.cs): `upstream/OpenTabletDriver/Interop/SystemInterop.cs`

### Other components

- **User**

## Connections

- User → Touchpad Probe: runs probe (evidence: `README.md`)
- User → Touchpad Info: inspects device (evidence: `README.md`)
- User → Desktop UI: configures mapping (evidence: `README.md`)
- User → Linux Probe: runs probe (evidence: `README.md`)
- Touchpad Probe → Mac Touchpad: reads touch data (evidence: `tools/TouchpadProbe/Program.cs`)
- Desktop UI → Settings: uses settings (evidence: `upstream/OpenTabletDriver.UX/App.cs`)
- Settings → Profiles: stores profiles (evidence: `upstream/OpenTabletDriver.Desktop/Settings.cs`)
- Driver Daemon → Device Detection: hosts driver (evidence: `upstream/OpenTabletDriver.Daemon/Program.cs`)
- Driver Daemon → Device Configurations: registers provider
- Driver Daemon → Report Parsers: registers provider
- Desktop UI → Driver Instance: accesses driver (evidence: `upstream/OpenTabletDriver.UX/App.cs`)
- Driver Instance → Plugin Install: installs plugins
- Plugin Install → Plugin Manager: loads plugins (evidence: `upstream/OpenTabletDriver.Desktop/Reflection/DesktopPluginManager.cs`)
- Desktop UI → Windows Interop: uses native APIs (evidence: `upstream/OpenTabletDriver.UX/App.cs`)
- App Paths → Platform Detection: selects platform paths (evidence: `upstream/OpenTabletDriver.Desktop/AppInfo.cs`)
