├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ ├── support_request.md │ └── tablet_configuration.md ├── PULL_REQUEST_TEMPLATE │ └── pull_request_template.md └── workflows │ ├── dotnet.yml │ └── release.yml ├── .gitignore ├── CONTRIBUTING.md ├── Directory.Build.props ├── LICENSE ├── OpenTabletDriver.Benchmarks ├── Benchmark.cs ├── Misc │ └── DriverInfoBenchmark.cs ├── OpenTabletDriver.Benchmarks.csproj ├── Output │ ├── LinuxInteropBenchmark.cs │ ├── MacOSInteropBenchmark.cs │ ├── NoopAbsoluteMode.cs │ ├── OutputBenchmark.cs │ └── WindowsInteropBenchmark.cs ├── Parser │ ├── ReportParserBenchmark.cs │ └── ReportParserProviderConstructBenchmark.cs └── Plugin │ └── PluginManagerBenchmark.cs ├── OpenTabletDriver.Configurations ├── Configurations │ ├── 10moon │ │ └── 1060N.json │ ├── Acepen │ │ └── AP 1060.json │ ├── Artisul │ │ └── M0610 Pro.json │ ├── Gaomon │ │ ├── 1060 Pro.json │ │ ├── M106K Pro.json │ │ ├── M106K.json │ │ ├── M10K Pro.json │ │ ├── M10K.json │ │ ├── M1220.json │ │ ├── M1230.json │ │ ├── PD1161.json │ │ ├── PD1560.json │ │ ├── S56K.json │ │ ├── S620.json │ │ └── S630.json │ ├── Genius │ │ ├── G-Pen 560.json │ │ └── i608x.json │ ├── Huion │ │ ├── 420.json │ │ ├── G10T.json │ │ ├── GC610.json │ │ ├── GT-220 V2.json │ │ ├── GT-221 Pro.json │ │ ├── H1060P.json │ │ ├── H1161.json │ │ ├── H420.json │ │ ├── H420X.json │ │ ├── H430P.json │ │ ├── H610 Pro V2.json │ │ ├── H610 Pro.json │ │ ├── H640P.json │ │ ├── H950P.json │ │ ├── HC16.json │ │ ├── HS610.json │ │ ├── HS611.json │ │ ├── HS64.json │ │ ├── Kamvas 13.json │ │ ├── Kamvas 16 (2021).json │ │ ├── Kamvas 16.json │ │ ├── Kamvas 20.json │ │ ├── Kamvas 22 Plus.json │ │ ├── Kamvas Pro 12.json │ │ ├── Kamvas Pro 13.json │ │ ├── Kamvas Pro 16.json │ │ ├── Kamvas Pro 20.json │ │ ├── New 1060 Plus (2048).json │ │ ├── New 1060 Plus.json │ │ ├── Q11K V2.json │ │ ├── Q11K.json │ │ ├── Q620M.json │ │ ├── WH1409 V2.json │ │ └── WH1409.json │ ├── Parblo │ │ ├── A610 Pro.json │ │ ├── A640 V2.json │ │ ├── Intangbo M.json │ │ ├── Intangbo S.json │ │ ├── Ninos M.json │ │ └── Ninos S.json │ ├── UC-Logic │ │ ├── 1060N.json │ │ └── PF1209.json │ ├── UGTABLET │ │ └── M708.json │ ├── VEIKK │ │ ├── A15 Pro.json │ │ ├── A15.json │ │ ├── A30.json │ │ ├── A50 V2.json │ │ ├── A50.json │ │ ├── S640 V2.json │ │ ├── S640.json │ │ └── VK640.json │ ├── ViewSonic │ │ └── Woodpad PF0730.json │ ├── Wacom │ │ ├── CTE-430.json │ │ ├── CTE-440.json │ │ ├── CTE-450.json │ │ ├── CTE-460.json │ │ ├── CTE-630.json │ │ ├── CTE-640.json │ │ ├── CTE-650.json │ │ ├── CTF-430.json │ │ ├── CTH-460.json │ │ ├── CTH-461.json │ │ ├── CTH-470.json │ │ ├── CTH-480.json │ │ ├── CTH-490.json │ │ ├── CTH-661.json │ │ ├── CTH-670.json │ │ ├── CTH-680.json │ │ ├── CTH-690.json │ │ ├── CTL-4100.json │ │ ├── CTL-4100WL.json │ │ ├── CTL-460.json │ │ ├── CTL-470.json │ │ ├── CTL-471.json │ │ ├── CTL-472.json │ │ ├── CTL-480.json │ │ ├── CTL-490.json │ │ ├── CTL-6100WL.json │ │ ├── CTL-671.json │ │ ├── CTL-672.json │ │ ├── CTL-680.json │ │ ├── CTL-690.json │ │ ├── DTC-133.json │ │ ├── ET-0405-U.json │ │ ├── ET-0405A-U.json │ │ ├── FT-0405-U.json │ │ ├── GD-0405-U.json │ │ ├── GD-0608-U.json │ │ ├── GD-0912-U.json │ │ ├── GD-1212-U.json │ │ ├── GD-1218-U.json │ │ ├── MTE-450.json │ │ ├── PTH-450.json │ │ ├── PTH-451.json │ │ ├── PTH-460.json │ │ ├── PTH-650.json │ │ ├── PTH-651.json │ │ ├── PTH-660.json │ │ ├── PTH-850.json │ │ ├── PTH-851.json │ │ ├── PTH-860.json │ │ ├── PTK-1240.json │ │ ├── PTK-440.json │ │ ├── PTK-450.json │ │ ├── PTK-540WL.json │ │ ├── PTK-640.json │ │ ├── PTK-650.json │ │ ├── PTK-840.json │ │ ├── PTZ-1230.json │ │ ├── PTZ-1231W.json │ │ ├── PTZ-430.json │ │ ├── PTZ-431W.json │ │ ├── PTZ-630.json │ │ ├── PTZ-631W.json │ │ ├── PTZ-930.json │ │ ├── XD-0405-U.json │ │ ├── XD-0608-U.json │ │ ├── XD-0912-U.json │ │ ├── XD-1212-U.json │ │ └── XD-1218-U.json │ ├── XP-Pen │ │ ├── Artist 12 Pro.json │ │ ├── Artist 12 V2.json │ │ ├── Artist 12.json │ │ ├── Artist 15.6 Pro.json │ │ ├── Artist 22HD.json │ │ ├── CT1060.json │ │ ├── CT430.json │ │ ├── CT640.json │ │ ├── Deco 01 V2 (variant 2).json │ │ ├── Deco 01 V2.json │ │ ├── Deco 01.json │ │ ├── Deco 02.json │ │ ├── Deco 03.json │ │ ├── Deco Pro Medium.json │ │ ├── Deco Pro Small.json │ │ ├── Deco mini4.json │ │ ├── Deco mini7.json │ │ ├── Innovator 16.json │ │ ├── Star 03.json │ │ ├── Star 05 V3.json │ │ ├── Star 06.json │ │ ├── Star 06C.json │ │ ├── Star G430.json │ │ ├── Star G430S V2.json │ │ ├── Star G430S.json │ │ ├── Star G540 Pro.json │ │ ├── Star G540.json │ │ ├── Star G640 V2.json │ │ ├── Star G640.json │ │ ├── Star G640S.json │ │ ├── Star G960.json │ │ ├── Star G960S Plus.json │ │ └── Star G960S.json │ └── XenceLabs │ │ └── Pen Tablet Medium.json ├── DeviceConfigurationProvider.cs ├── OpenTabletDriver.Configurations.csproj ├── Parsers │ ├── 10moon │ │ ├── 10moonAuxParser.cs │ │ ├── 10moonReportParser.cs │ │ └── 10moonTabletReport.cs │ ├── Acepen │ │ ├── AcepenAuxReport.cs │ │ ├── AcepenReportParser.cs │ │ └── AcepenTabletReport.cs │ ├── Genius │ │ ├── GeniusButtonStripAuxReport.cs │ │ ├── GeniusMouseReport.cs │ │ ├── GeniusReportParser.cs │ │ ├── GeniusReportParserV2.cs │ │ └── GeniusTabletReport.cs │ ├── Huion │ │ ├── GianoReport.cs │ │ └── GianoReportParser.cs │ ├── SkipByteTabletReportParser.cs │ ├── UCLogic │ │ ├── UCLogicAuxReport.cs │ │ ├── UCLogicReportParser.cs │ │ └── UCLogicTiltReportParser.cs │ ├── Veikk │ │ ├── VeikkReportParser.cs │ │ └── VeikkTabletReport.cs │ ├── ViewSonic │ │ ├── WoodPadParser.cs │ │ └── WoodPadReport.cs │ ├── Wacom │ │ ├── Bamboo │ │ │ ├── BambooAuxReport.cs │ │ │ ├── BambooMouseReport.cs │ │ │ ├── BambooReportParser.cs │ │ │ └── BambooTabletReport.cs │ │ ├── Intuos │ │ │ ├── IntuosReportParser.cs │ │ │ ├── IntuosTabletReport.cs │ │ │ └── WacomDriverIntuosReportParser.cs │ │ ├── Intuos3 │ │ │ ├── Intuos3AuxReport.cs │ │ │ ├── Intuos3MouseReport.cs │ │ │ ├── Intuos3ReportParser.cs │ │ │ └── WacomDriverIntuos3ReportParser.cs │ │ ├── Intuos4 │ │ │ └── Intuos4AuxReport.cs │ │ ├── IntuosV1 │ │ │ ├── IntuosV1AuxReport.cs │ │ │ ├── IntuosV1ReportParser.cs │ │ │ ├── IntuosV1TabletReport.cs │ │ │ ├── IntuosV1ToolReport.cs │ │ │ └── WacomDriverIntuosV1ReportParser.cs │ │ ├── IntuosV2 │ │ │ ├── IntuosV2AuxReport.cs │ │ │ ├── IntuosV2Report.cs │ │ │ ├── IntuosV2ReportParser.cs │ │ │ ├── IntuosV2TouchReport.cs │ │ │ └── WacomDriverIntuosV2ReportParser.cs │ │ ├── Wacom64bAuxReportParser.cs │ │ └── WacomTouchReport.cs │ ├── XP_Pen │ │ ├── XP_PenAuxReport.cs │ │ ├── XP_PenOffsetAuxReportParser.cs │ │ ├── XP_PenOffsetPressureReportParser.cs │ │ ├── XP_PenPressureOffsetTabletReport.cs │ │ ├── XP_PenPressureOffsetTiltTabletReport.cs │ │ ├── XP_PenReportParser.cs │ │ ├── XP_PenTabletOverflowReport.cs │ │ ├── XP_PenTabletPressureOffsetOverflowReport.cs │ │ └── XP_PenTabletReport.cs │ └── XenceLabs │ │ ├── XenceLabsReportParser.cs │ │ └── XenceLabsTabletReport.cs └── ReportParserProvider.cs ├── OpenTabletDriver.Console ├── CommandTools.cs ├── Extensions.cs ├── OpenTabletDriver.Console.csproj ├── Program.Commands.cs ├── Program.IPC.cs ├── Program.Misc.cs └── Program.cs ├── OpenTabletDriver.Daemon ├── DriverDaemon.cs ├── OpenTabletDriver.Daemon.csproj └── Program.cs ├── OpenTabletDriver.Desktop ├── AppInfo.cs ├── Binding │ ├── BindingHandler.cs │ ├── BindingState.cs │ ├── KeyBinding.cs │ ├── LinuxArtistMode │ │ └── LinuxArtistModeButtonBinding.cs │ ├── MouseBinding.cs │ ├── MultiKeyBinding.cs │ └── ThresholdBindingState.cs ├── Compression │ └── CompressionTools.cs ├── Contracts │ └── IDriverDaemon.cs ├── Conversion │ ├── ConversionFactorAreaConverter.cs │ ├── PercentageAreaConverter.cs │ └── XP_PenDriverAreaConverter.cs ├── Converters │ └── VersionConverter.cs ├── DesktopDeviceConfigurationProvider.cs ├── DesktopReportParserProvider.cs ├── Diagnostics │ ├── DiagnosticInfo.cs │ └── EnvironmentDictionary.cs ├── FileUtilities.cs ├── Interop │ ├── DesktopInterop.cs │ ├── Display │ │ ├── Display.cs │ │ ├── MacOSDisplay.cs │ │ ├── WaylandDisplay.cs │ │ ├── WaylandOutput.cs │ │ ├── WindowsDisplay.cs │ │ └── XScreen.cs │ ├── Input │ │ ├── Absolute │ │ │ ├── EvdevAbsolutePointer.cs │ │ │ ├── EvdevVirtualTablet.cs │ │ │ ├── MacOSAbsolutePointer.cs │ │ │ └── WindowsAbsolutePointer.cs │ │ ├── EvdevVirtualMouse.cs │ │ ├── InputDictionary.cs │ │ ├── Keyboard │ │ │ ├── EvdevVirtualKeyboard.cs │ │ │ ├── MacOSVirtualKeyboard.cs │ │ │ └── WindowsVirtualKeyboard.cs │ │ ├── MacOSVirtualMouse.cs │ │ ├── Relative │ │ │ ├── EvdevRelativePointer.cs │ │ │ ├── MacOSRelativePointer.cs │ │ │ └── WindowsRelativePointer.cs │ │ └── WindowsVirtualMouse.cs │ └── Timer │ │ ├── FallbackTimer.cs │ │ ├── LinuxTimer.cs │ │ └── WindowsTimer.cs ├── Migration │ ├── LegacySettings │ │ └── V5 │ │ │ └── Settings.cs │ └── SettingsMigrator.cs ├── OpenTabletDriver.Desktop.csproj ├── Output │ ├── AbsoluteMode.cs │ ├── LinuxArtistMode.cs │ └── RelativeMode.cs ├── Preset.cs ├── PresetManager.cs ├── Profiles │ ├── AbsoluteModeSettings.cs │ ├── AreaSettings.cs │ ├── BindingSettings.cs │ ├── Profile.cs │ ├── ProfileCollection.cs │ └── RelativeModeSettings.cs ├── RPC │ ├── DebugReportData.cs │ ├── RpcClient.cs │ └── RpcHost.cs ├── Reflection │ ├── DesktopPluginContext.cs │ ├── DesktopPluginManager.cs │ ├── Extensions.cs │ ├── IServiceManager.cs │ ├── Metadata │ │ ├── PluginMetadata.cs │ │ └── PluginMetadataCollection.cs │ ├── PluginContext.cs │ ├── PluginManager.cs │ ├── PluginSetting.cs │ ├── PluginSettingStore.cs │ ├── PluginSettingStoreCollection.cs │ └── ServiceManager.cs ├── Serialization.cs ├── Settings.cs ├── Updater │ ├── IUpdater.cs │ ├── MacOSUpdater.cs │ ├── Updater.cs │ └── WindowsUpdater.cs └── ViewModel.cs ├── OpenTabletDriver.Linux.slnf ├── OpenTabletDriver.MacOS.slnf ├── OpenTabletDriver.Native ├── Linux │ ├── ERRNO.cs │ ├── Evdev │ │ ├── Evdev.cs │ │ ├── EvdevDevice.cs │ │ ├── EventCode.cs │ │ ├── EventType.cs │ │ └── Structs │ │ │ └── input_absinfo.cs │ ├── Timers │ │ ├── ClockID.cs │ │ ├── SigEv.cs │ │ ├── Structs │ │ │ ├── SigEvThread.cs │ │ │ ├── SigEvent.cs │ │ │ ├── SigVal.cs │ │ │ ├── TimeSpec.cs │ │ │ └── TimerSpec.cs │ │ ├── TimerFlag.cs │ │ └── Timers.cs │ └── Xorg │ │ ├── XLib.cs │ │ ├── XRRMonitorInfo.cs │ │ └── XRandr.cs ├── OSX │ ├── Generic │ │ ├── CGEventTapLocation.cs │ │ ├── CGEventType.cs │ │ ├── CGPoint.cs │ │ ├── CGRect.cs │ │ └── CGSize.cs │ ├── Input │ │ ├── CGKeyCode.cs │ │ └── CGMouseButton.cs │ └── OSX.cs ├── OpenTabletDriver.Native.csproj └── Windows │ ├── CM │ ├── CM_NOTIFY_ACTION.cs │ ├── CM_NOTIFY_EVENT_DATA.cs │ ├── CM_NOTIFY_FILTER.cs │ ├── CM_NOTIFY_FILTER_FLAG.cs │ ├── CM_NOTIFY_FILTER_TYPE.cs │ ├── CR.cs │ └── SafeCmNotificationHandle.cs │ ├── CfgMgr32.cs │ ├── Display │ ├── DevMode.cs │ ├── DisplayInfo.cs │ ├── DpiType.cs │ ├── MONITORINFOF.cs │ └── MonitorInfoEx.cs │ ├── Generic │ ├── POINT.cs │ ├── Rect.cs │ └── SafeFileHandle.cs │ ├── Input │ ├── HARDWAREINPUT.cs │ ├── INPUT.cs │ ├── InputUnion.cs │ ├── KEYBDINPUT.cs │ ├── KEYEVENTF.cs │ ├── KEYSTATE.cs │ ├── MOUSEEVENTF.cs │ ├── MOUSEINPUT.cs │ ├── VK.cs │ ├── VirtualKeyStates.cs │ └── XBUTTON.cs │ ├── SetupApi.cs │ ├── SetupApiStructs │ ├── SP_DEVICE_INTERFACE_DATA.cs │ └── SP_DEVICE_INTERFACE_DETAIL_DATA.cs │ ├── Timers │ ├── EventType.cs │ └── TimeCaps.cs │ ├── USB │ ├── DIGCF.cs │ ├── DescriptorHeader.cs │ ├── DescriptorType.cs │ ├── DeviceDescriptor.cs │ ├── InterfaceDescriptor.cs │ ├── PipeDirection.cs │ ├── PipeInfo.cs │ ├── PipeType.cs │ ├── RequestDirection.cs │ ├── RequestInternalType.cs │ ├── RequestRecipient.cs │ ├── RequestType.cs │ ├── SafeWinUsbInterfaceHandle.cs │ ├── SetupPacket.cs │ ├── StandardRequestCode.cs │ └── StringDescriptor.cs │ ├── WinUSB.cs │ └── Windows.cs ├── OpenTabletDriver.Plugin ├── Area.cs ├── Attributes │ ├── ActionAttribute.cs │ ├── BooleanPropertyAttribute.cs │ ├── BuildDateAttribute.cs │ ├── DefaultPropertyValueAttribute.cs │ ├── DeviceHubAttribute.cs │ ├── ModifierAttribute.cs │ ├── PluginIgnoreAttribute.cs │ ├── PluginNameAttribute.cs │ ├── PropertyAttribute.cs │ ├── PropertyValidatedAttribute.cs │ ├── SliderPropertyAttribute.cs │ ├── SupportedPlatformAttribute.cs │ ├── TabletReferenceAttribute.cs │ ├── ToolTipAttribute.cs │ └── UnitAttribute.cs ├── Components │ ├── ICompositeDeviceHub.cs │ ├── IDeviceConfigurationProvider.cs │ ├── IDeviceHubsProvider.cs │ └── IReportParserProvider.cs ├── DependencyInjection │ ├── OnDependencyLoadAttribute.cs │ └── ResolvedAttribute.cs ├── Devices │ ├── DevicesChangedEventArgs.cs │ ├── IDeviceEndpoint.cs │ ├── IDeviceEndpointStream.cs │ ├── IDeviceHub.cs │ └── SerializedDeviceEndpoint.cs ├── HPETDeltaStopwatch.cs ├── IBinding.cs ├── IDriver.cs ├── IStateBinding.cs ├── ITimer.cs ├── ITool.cs ├── Log.cs ├── LogLevel.cs ├── Logging │ └── LogMessage.cs ├── OpenTabletDriver.Plugin.csproj ├── Output │ ├── AbsoluteOutputMode.cs │ ├── AsyncPositionedPipelineElement.cs │ ├── IOutputMode.cs │ ├── IPipelineElement.cs │ ├── IPointerProvider.cs │ ├── IPositionedPipelineElement.cs │ ├── OutputMode.cs │ ├── PipelineManager.cs │ ├── PipelinePosition.cs │ └── RelativeOutputMode.cs ├── Platform │ ├── Display │ │ ├── IDisplay.cs │ │ └── IVirtualScreen.cs │ ├── Keyboard │ │ └── IVirtualKeyboard.cs │ └── Pointer │ │ ├── IAbsolutePointer.cs │ │ ├── IEraserHandler.cs │ │ ├── IHoverDistanceHandler.cs │ │ ├── IMouseButtonHandler.cs │ │ ├── IPressureHandler.cs │ │ ├── IProximityHandler.cs │ │ ├── IRelativePointer.cs │ │ ├── ISynchronousPointer.cs │ │ ├── ITiltHandler.cs │ │ └── MouseButton.cs ├── PluginPlatform.cs └── Tablet │ ├── AuxReport.cs │ ├── AuxReportParser.cs │ ├── ButtonSpecifications.cs │ ├── ByteExtensions.cs │ ├── DetectionRange.cs │ ├── DeviceIdentifier.cs │ ├── DeviceReport.cs │ ├── DeviceVendor.cs │ ├── DigitizerSpecifications.cs │ ├── IAbsolutePositionReport.cs │ ├── IAreaConverter.cs │ ├── IAuxReport.cs │ ├── IDeviceReport.cs │ ├── IEraserReport.cs │ ├── IMouseReport.cs │ ├── IProximityReport.cs │ ├── IReportParser.cs │ ├── ITabletReport.cs │ ├── ITiltReport.cs │ ├── IToolReport.cs │ ├── OutOfRangeReport.cs │ ├── PassthroughReportParser.cs │ ├── PenSpecifications.cs │ ├── TabletConfiguration.cs │ ├── TabletReference.cs │ ├── TabletReport.cs │ ├── TabletReportParser.cs │ ├── TabletSpecifications.cs │ ├── TiltTabletReport.cs │ ├── TiltTabletReportParser.cs │ ├── ToolType.cs │ └── Touch │ ├── ITouchReport.cs │ └── TouchPoint.cs ├── OpenTabletDriver.Tests ├── ConfigurationTest.cs ├── DetectionRangeTest.cs ├── OpenTabletDriver.Tests.csproj ├── PluginMetadataTest.cs ├── ReportParserProviderTest.cs ├── StrictServiceCollectionTest.cs ├── TimerTests.cs └── UpdaterTests.cs ├── OpenTabletDriver.Tools.udev ├── Comparers │ └── IdentifierComparer.cs ├── Extensions.cs ├── OpenTabletDriver.Tools.udev.csproj ├── Program.cs └── RuleGenerator.cs ├── OpenTabletDriver.UX.Gtk ├── OpenTabletDriver.UX.Gtk.csproj └── Program.cs ├── OpenTabletDriver.UX.MacOS ├── Icon.icns ├── Info.plist ├── OpenTabletDriver.UX.MacOS.csproj └── Program.cs ├── OpenTabletDriver.UX.Wpf ├── OpenTabletDriver.UX.Wpf.csproj └── Program.cs ├── OpenTabletDriver.UX ├── App.cs ├── Assets │ ├── otd.ico │ └── otd.png ├── Attributes │ └── PageNameAttribute.cs ├── ChildDialog.cs ├── Controls │ ├── BindingDisplay.cs │ ├── Bindings │ │ ├── AuxiliaryBindingEditor.cs │ │ ├── BindingDisplayList.cs │ │ ├── BindingEditor.cs │ │ ├── MouseBindingEditor.cs │ │ └── PenBindingEditor.cs │ ├── ControlPanel.cs │ ├── GeneratedControls.cs │ ├── Generic │ │ ├── Dictionary │ │ │ ├── DictionaryEditor.cs │ │ │ └── StringDictionaryEditor.cs │ │ ├── DropDown.cs │ │ ├── FloatSlider.cs │ │ ├── GeneratedItemList.cs │ │ ├── Group.cs │ │ ├── InputBox.cs │ │ ├── ListBox.cs │ │ ├── ModifiableConstructableItemList.cs │ │ ├── ModifiableItemList.cs │ │ ├── PaddingSpacerItem.cs │ │ ├── Reflection │ │ │ ├── Extensions.cs │ │ │ ├── TypeDropDown.cs │ │ │ └── TypeListBox.cs │ │ ├── ScheduledDrawable.cs │ │ ├── StackView.cs │ │ ├── StackedContent.cs │ │ ├── StylizedText.cs │ │ ├── Text │ │ │ ├── DoubleNumberBox.cs │ │ │ ├── FloatNumberBox.cs │ │ │ ├── HexByteArrayBox.cs │ │ │ ├── HexNumberBox.cs │ │ │ ├── IntegerNumberBox.cs │ │ │ ├── Providers │ │ │ │ ├── MaskedTextProvider.cs │ │ │ │ ├── NumberTextProvider.cs │ │ │ │ └── RegexTextProvider.cs │ │ │ └── UnsignedIntegerNumberBox.cs │ │ └── TextContent.cs │ ├── LogView.cs │ ├── Output │ │ ├── AbsoluteModeEditor.cs │ │ ├── Area │ │ │ ├── AreaControl.cs │ │ │ ├── AreaDisplay.cs │ │ │ ├── AreaEditor.cs │ │ │ ├── RotationAreaEditor.cs │ │ │ └── UnitGroup.cs │ │ ├── OutputModeEditor.cs │ │ └── RelativeModeEditor.cs │ ├── Placeholder.cs │ ├── PluginSettingStoreCollectionEditor.cs │ ├── PluginSettingStoreEditor.cs │ ├── TabletSwitcherPanel.cs │ └── Utilities │ │ ├── ActionCommand.cs │ │ └── BooleanCommand.cs ├── DaemonWatchdog.cs ├── DesktopForm.cs ├── Dialogs │ └── RepositoryDialog.cs ├── Extensions.cs ├── IViewModelRoot.cs ├── MainForm.cs ├── OpenTabletDriver.UX.csproj ├── RPC │ └── DaemonRpcClient.cs ├── Tools │ ├── CompositionScheduler.cs │ ├── EnumTools.cs │ ├── LogDataStore.cs │ ├── ParseTools.cs │ └── ReportFormatter.cs ├── TrayIcon.cs └── Windows │ ├── AreaConverterDialog.cs │ ├── Bindings │ ├── AdvancedBindingEditorDialog.cs │ └── BindingEditorDialog.cs │ ├── Configurations │ ├── ConfigurationEditor.cs │ └── Controls │ │ ├── DeviceIdentifierEditor.cs │ │ └── Specifications │ │ ├── ButtonSpecificationsEditor.cs │ │ ├── DigitizerSpecificationsEditor.cs │ │ ├── PenSpecificationsEditor.cs │ │ ├── SpecificationsEditor.cs │ │ └── TabletSpecificationsEditor.cs │ ├── DeviceListDialog.cs │ ├── DeviceStringReader.cs │ ├── Greeter │ ├── Pages │ │ ├── AreaEditorPage.cs │ │ ├── BindingPage.cs │ │ ├── FAQPage.cs │ │ ├── PluginPage.cs │ │ ├── SystemTrayPage.cs │ │ └── WelcomePage.cs │ └── StartupGreeterWindow.cs │ ├── Plugins │ ├── MetadataViewer.cs │ ├── PluginDropPanel.cs │ ├── PluginManagerWindow.cs │ └── PluginMetadataList.cs │ ├── StylizedPage.cs │ ├── Tablet │ └── TabletDebugger.cs │ ├── Updater │ └── UpdaterWindow.cs │ └── WindowSingleton.cs ├── OpenTabletDriver.Windows.slnf ├── OpenTabletDriver.sln ├── OpenTabletDriver ├── ComponentProviders │ └── DeviceHubsProvider.cs ├── Devices │ ├── DeviceReader.cs │ ├── HidSharpBackend │ │ ├── HidSharpDeviceRoot.cs │ │ ├── HidSharpEndpoint.cs │ │ └── HidSharpEndpointStream.cs │ ├── RootHub.cs │ └── WinUSB │ │ ├── WinUSBInterface.cs │ │ ├── WinUSBInterfaceStream.cs │ │ ├── WinUSBRootHub.cs │ │ └── WindowsEnumerationException.cs ├── Driver.cs ├── DriverAlreadyBuiltException.cs ├── DriverBuilder.cs ├── DriverServiceCollection.cs ├── Extensions.cs ├── InputDevice.cs ├── InputDeviceTree.cs ├── InputDeviceTreeList.cs ├── Instance.cs ├── Interop │ ├── SleepDetectionThread.cs │ └── SystemInterop.cs ├── OpenTabletDriver.csproj └── SystemDrivers │ ├── DriverInfo.cs │ ├── IDriverInfoProvider.cs │ └── Providers │ ├── GaomonDriverInfoProvider.cs │ ├── HuionDriverInfoProvider.cs │ ├── OpenTabletDriverInfoProvider.cs │ ├── ProcessModuleQueryableDriverInfoProvider.cs │ ├── TabletDriverInfoProvider.cs │ ├── VeikkDriverInfoProvider.cs │ ├── WacomDriverInfoProvider.cs │ └── XPPenDriverInfoProvider.cs ├── README.md ├── README_CN.md ├── README_ES.md ├── README_FR.md ├── README_KO.md ├── README_RU.md ├── TABLETS.md ├── build.sh ├── docs └── manpages │ └── opentabletdriver.8 ├── generate-rules.sh └── nuget.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: infinityghost 2 | ko_fi: infinityghost 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a bug report to help fix issues with OpenTabletDriver 4 | title: '' 5 | labels: 'bug' 6 | assignees: '' 7 | --- 8 | 9 | ## Description 10 | 11 | 12 | ## System Information: 13 | 14 | | Name | Value | 15 | | ---------------- | ----- | 16 | | Operating System | 17 | | OpenTabletDriver Version | 18 | | Tablet | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Create a feature request to help add more to OpenTabletDriver 4 | title: '' 5 | labels: 'enhancement' 6 | assignees: '' 7 | --- 8 | 9 | ## Description 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/support_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Support Request 3 | about: Request help for something that isn't an obvious bug. 4 | title: 'Support Request: ' 5 | labels: 'support request' 6 | assignees: '' 7 | --- 8 | 9 | # Support Request 10 | 11 | 12 | 13 | ## What I've already tried 14 | 15 | 16 | ## Diagnostic Information 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/tablet_configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Configuration Request 3 | about: Request for a new tablet to be added 4 | title: 'Add support for ' 5 | labels: 'configuration' 6 | assignees: '' 7 | --- 8 | 9 | # Tablet Information 10 | 11 | 12 | 13 | | Name | Value | 14 | | --------------- | ----- | 15 | | Manufacturer | 16 | | Product Name | 17 | | Width | 18 | | Height | 19 | | Pressure Levels | 20 | | LPI | 21 | 22 | ## Diagnostic Information 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Changes 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE 2 | .vs/ 3 | .vscode/ 4 | .idea/ 5 | 6 | # Build Artifacts 7 | obj/ 8 | bin/ 9 | nupkg/ 10 | [Bb]uild/ 11 | 12 | # BenchmarkDotNet Artifacts 13 | BenchmarkDotNet.Artifacts/ 14 | 15 | # User Preferences 16 | *.user 17 | 18 | # MacOS Cache 19 | *.DS_Store 20 | 21 | # Nix 22 | .envrc 23 | shell.nix 24 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.6.0.2 4 | net6.0 5 | preview 6 | $(VersionBase) 7 | 8 | 9 | 10 | InfinityGhost 11 | LGPL-3.0-or-later 12 | 13 | 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Benchmark.cs: -------------------------------------------------------------------------------- 1 | using BenchmarkDotNet.Running; 2 | 3 | namespace OpenTabletDriver.Benchmarks 4 | { 5 | public class Benchmark 6 | { 7 | public static void Main(string[] args) 8 | { 9 | BenchmarkSwitcher.FromAssembly(typeof(Benchmark).Assembly).Run(args); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Misc/DriverInfoBenchmark.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using BenchmarkDotNet.Attributes; 3 | using OpenTabletDriver.SystemDrivers; 4 | 5 | namespace OpenTabletDriver.Benchmarks.Misc 6 | { 7 | public class DriverInfoBenchmark 8 | { 9 | [Benchmark] 10 | public DriverInfo[] GetDriverInfos() 11 | { 12 | return DriverInfo.GetDriverInfos().ToArray(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/OpenTabletDriver.Benchmarks.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(FrameworkBase) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Output/LinuxInteropBenchmark.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using BenchmarkDotNet.Attributes; 3 | using OpenTabletDriver.Desktop.Interop.Input.Absolute; 4 | using OpenTabletDriver.Desktop.Interop.Input.Relative; 5 | 6 | namespace OpenTabletDriver.Benchmarks.Output 7 | { 8 | public class LinuxInteropBenchmark 9 | { 10 | EvdevAbsolutePointer absolutePointer = new EvdevAbsolutePointer(); 11 | EvdevRelativePointer relativePointer = new EvdevRelativePointer(); 12 | 13 | [Benchmark] 14 | public void EvdevAbsolute() 15 | { 16 | absolutePointer.SetPosition(Vector2.Zero); 17 | } 18 | 19 | [Benchmark] 20 | public void EvdevRelative() 21 | { 22 | relativePointer.SetPosition(Vector2.Zero); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Output/MacOSInteropBenchmark.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using BenchmarkDotNet.Attributes; 3 | using OpenTabletDriver.Desktop.Interop.Input.Absolute; 4 | using OpenTabletDriver.Desktop.Interop.Input.Relative; 5 | 6 | namespace OpenTabletDriver.Benchmarks.Output 7 | { 8 | public class MacOSInteropBenchmark 9 | { 10 | private MacOSAbsolutePointer absolutePointer = new MacOSAbsolutePointer(); 11 | private MacOSRelativePointer relativePointer = new MacOSRelativePointer(); 12 | 13 | [Benchmark] 14 | public void CoreGraphicsAbsolute() 15 | { 16 | absolutePointer.SetPosition(Vector2.Zero); 17 | } 18 | 19 | [Benchmark] 20 | public void CoreGraphicsRelative() 21 | { 22 | relativePointer.SetPosition(Vector2.Zero); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Output/NoopAbsoluteMode.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using OpenTabletDriver.Plugin.Output; 3 | using OpenTabletDriver.Plugin.Platform.Pointer; 4 | 5 | namespace OpenTabletDriver.Benchmarks.Output 6 | { 7 | public sealed class NoopAbsoluteMode : AbsoluteOutputMode 8 | { 9 | public override IAbsolutePointer Pointer { set; get; } = new NoopPointer(); 10 | 11 | public class NoopPointer : IAbsolutePointer 12 | { 13 | public Vector2 Position { private set; get; } 14 | 15 | public void SetPosition(Vector2 pos) 16 | { 17 | Position = pos; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Output/WindowsInteropBenchmark.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using BenchmarkDotNet.Attributes; 3 | using OpenTabletDriver.Desktop.Interop.Input.Absolute; 4 | using OpenTabletDriver.Desktop.Interop.Input.Relative; 5 | 6 | namespace OpenTabletDriver.Benchmarks.Output 7 | { 8 | public class WindowsInteropBenchmark 9 | { 10 | private WindowsAbsolutePointer absolutePointer = new WindowsAbsolutePointer(); 11 | private WindowsRelativePointer relativePointer = new WindowsRelativePointer(); 12 | 13 | [Benchmark] 14 | public void SendInputAbsolute() 15 | { 16 | absolutePointer.SetPosition(Vector2.Zero); 17 | } 18 | 19 | [Benchmark] 20 | public void SendInputRelative() 21 | { 22 | relativePointer.SetPosition(Vector2.Zero); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Parser/ReportParserBenchmark.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BenchmarkDotNet.Attributes; 3 | using OpenTabletDriver.Configurations.Parsers; 4 | using OpenTabletDriver.Plugin.Tablet; 5 | 6 | namespace OpenTabletDriver.Benchmarks.Parser 7 | { 8 | public class ReportParserBenchmark 9 | { 10 | private TabletReportParser parser = new TabletReportParser(); 11 | private SkipByteTabletReportParser skipParser = new SkipByteTabletReportParser(); 12 | private byte[] data; 13 | 14 | [GlobalSetup] 15 | public void Setup() 16 | { 17 | data = new byte[10]; 18 | var randGen = new Random(); 19 | randGen.NextBytes(data); 20 | } 21 | 22 | [Benchmark] 23 | public void ReportParser() 24 | { 25 | parser.Parse(data); 26 | } 27 | 28 | [Benchmark] 29 | public void SkipByteReportParser() 30 | { 31 | skipParser.Parse(data); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Parser/ReportParserProviderConstructBenchmark.cs: -------------------------------------------------------------------------------- 1 | using BenchmarkDotNet.Attributes; 2 | using OpenTabletDriver.Configurations; 3 | 4 | namespace OpenTabletDriver.Benchmarks.Parser 5 | { 6 | [DryJob] 7 | public class ReportParserProviderBenchmark 8 | { 9 | public ReportParserProvider ReportParserProvider; 10 | 11 | [Benchmark] 12 | public void ConstructReportParserProvider() 13 | { 14 | ReportParserProvider = new ReportParserProvider(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Benchmarks/Plugin/PluginManagerBenchmark.cs: -------------------------------------------------------------------------------- 1 | using BenchmarkDotNet.Attributes; 2 | using OpenTabletDriver.Desktop.Reflection; 3 | 4 | namespace OpenTabletDriver.Benchmarks.Plugin 5 | { 6 | [DryJob] 7 | public class PluginManagerBenchmark 8 | { 9 | public PluginManager pluginManager; 10 | 11 | [Benchmark] 12 | public void PluginManagerCtor() 13 | { 14 | pluginManager = new PluginManager(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Acepen/AP 1060.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Acepen AP 1060", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 21827, 25 | "ProductID": 130, 26 | "InputReportLength": 11, 27 | "OutputReportLength": 9, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Acepen.AcepenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "CQrhSgAAbD0A", 32 | "CQEE", 33 | "CQIC" 34 | ], 35 | "DeviceStrings": {}, 36 | "InitializationStrings": [] 37 | } 38 | ], 39 | "AuxilaryDeviceIdentifiers": [], 40 | "Attributes": {} 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Genius/i608x.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Genius i608x", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 203.2, 6 | "Height": 152.4, 7 | "MaxX": 40960.0, 8 | "MaxY": 30720.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 2047, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": { 18 | "ButtonCount": 3 19 | }, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 1112, 25 | "ProductID": 20506, 26 | "InputReportLength": 16, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Genius.GeniusReportParser", 29 | "FeatureInitReport": [ 30 | "BRIQERIAAAA=" 31 | ], 32 | "OutputInitReport": null, 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": {} 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Huion/GT-220 V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Huion GT-220 V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 476.68, 6 | "Height": 268.145, 7 | "MaxX": 95336.0, 8 | "MaxY": 53629.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 9580, 23 | "ProductID": 110, 24 | "InputReportLength": 12, 25 | "OutputReportLength": null, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Huion.GianoReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": null, 29 | "DeviceStrings": { 30 | "201": "HUION_M165_\\d{6}$" 31 | }, 32 | "InitializationStrings": [ 33 | 200 34 | ] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Huion/Kamvas 20.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Huion Kamvas 20", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 434.75, 6 | "Height": 238.75, 7 | "MaxX": 86950.0, 8 | "MaxY": 47750.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 9580, 23 | "ProductID": 110, 24 | "InputReportLength": 12, 25 | "OutputReportLength": null, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Huion.GianoReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": null, 29 | "DeviceStrings": { 30 | "201": "HUION_M192_\\d{6}$" 31 | }, 32 | "InitializationStrings": [ 33 | 200 34 | ] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Parblo/A610 Pro.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Parblo A610 Pro", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 255.5, 6 | "Height": 160.0, 7 | "MaxX": 51100.0, 8 | "MaxY": 32000.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 6403, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 10, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Parblo/A640 V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Parblo A640 V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 150.0, 6 | "Height": 90.0, 7 | "MaxX": 31203.0, 8 | "MaxY": 18730.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 1155, 25 | "ProductID": 42560, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAEAAAAAAA=" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/UC-Logic/PF1209.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "UC-Logic PF1209", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 305.0, 6 | "Height": 229.0, 7 | "MaxX": 47999.0, 8 | "MaxY": 35999.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 1023, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 21827, 23 | "ProductID": 66, 24 | "InputReportLength": 8, 25 | "OutputReportLength": null, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.UCLogic.UCLogicReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": null, 29 | "DeviceStrings": { 30 | "2": "TabletPF1209\u0014" 31 | }, 32 | "InitializationStrings": [ 33 | 109 34 | ] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/A15 Pro.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK A15 Pro", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 12 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 12267, 25 | "ProductID": 6, 26 | "InputReportLength": 9, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.SkipByteTabletReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "CQEE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/A15.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK A15", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 12 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 12267, 25 | "ProductID": 4, 26 | "InputReportLength": 9, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.SkipByteTabletReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "CQEE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/A30.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK A30", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 12267, 25 | "ProductID": 2, 26 | "InputReportLength": 9, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.SkipByteTabletReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "CQEE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/A50 V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK A50 V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 12267, 25 | "ProductID": 3, 26 | "InputReportLength": 13, 27 | "OutputReportLength": 9, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Veikk.VeikkReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "CQEE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/A50.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK A50", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 12267, 25 | "ProductID": 3, 26 | "InputReportLength": 9, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.SkipByteTabletReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "CQEE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/S640 V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK S640 V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 152.4, 6 | "Height": 101.6, 7 | "MaxX": 30480.0, 8 | "MaxY": 20320.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 12267, 23 | "ProductID": 1, 24 | "InputReportLength": 13, 25 | "OutputReportLength": 9, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Veikk.VeikkReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "CQEE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/S640.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK S640", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 152.4, 6 | "Height": 101.6, 7 | "MaxX": 30480.0, 8 | "MaxY": 20320.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 12267, 23 | "ProductID": 1, 24 | "InputReportLength": 9, 25 | "OutputReportLength": 9, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.SkipByteTabletReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "CQEE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/VEIKK/VK640.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VEIKK VK640", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 152.4, 6 | "Height": 101.6, 7 | "MaxX": 30480.0, 8 | "MaxY": 20320.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 12267, 23 | "ProductID": 5, 24 | "InputReportLength": 13, 25 | "OutputReportLength": 9, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Veikk.VeikkReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "CQEE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/ViewSonic/Woodpad PF0730.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ViewSonic Woodpad PF0730", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 168.0, 6 | "Height": 106.4, 7 | "MaxX": 16800.0, 8 | "MaxY": 10640.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 4095, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 1347, 23 | "ProductID": 58983, 24 | "InputReportLength": 14, 25 | "OutputReportLength": null, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.ViewSonic.WoodPadReportParser", 27 | "FeatureInitReport": [ 28 | "AhABAAA=" 29 | ], 30 | "OutputInitReport": null, 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": {} 37 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Wacom/CTE-450.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Wacom CTE-450", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 147.6, 6 | "Height": 92.25, 7 | "MaxX": 14760.0, 8 | "MaxY": 9225.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 511, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 1386, 25 | "ProductID": 23, 26 | "InputReportLength": 9, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Wacom.Intuos.IntuosReportParser", 29 | "FeatureInitReport": [ 30 | "AgI=" 31 | ], 32 | "OutputInitReport": null, 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": {} 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Wacom/CTE-650.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Wacom CTE-650", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 216.48, 6 | "Height": 135.3, 7 | "MaxX": 21648.0, 8 | "MaxY": 13530.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 511, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 1386, 25 | "ProductID": 24, 26 | "InputReportLength": 9, 27 | "OutputReportLength": null, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Wacom.Intuos.IntuosReportParser", 29 | "FeatureInitReport": [ 30 | "AgI=" 31 | ], 32 | "OutputInitReport": null, 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": {} 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/Wacom/CTF-430.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Wacom CTF-430", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 127.6, 6 | "Height": 92.8, 7 | "MaxX": 5104.0, 8 | "MaxY": 3712.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 511, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 1386, 23 | "ProductID": 105, 24 | "InputReportLength": 8, 25 | "OutputReportLength": 0, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.Wacom.Intuos.IntuosReportParser", 27 | "FeatureInitReport": [ 28 | "AgI=" 29 | ], 30 | "OutputInitReport": null, 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": {} 37 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Artist 12 Pro.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Artist 12 Pro", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 256.34, 6 | "Height": 144.15, 7 | "MaxX": 25634.0, 8 | "MaxY": 14415.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2335, 26 | "InputReportLength": 12, 27 | "OutputReportLength": 12, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Artist 12 V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Artist 12 V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 263.19, 6 | "Height": 148.08, 7 | "MaxX": 52638.0, 8 | "MaxY": 29616.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2058, 26 | "InputReportLength": 12, 27 | "OutputReportLength": 33, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenOffsetPressureReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Artist 12.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Artist 12", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 256.32, 6 | "Height": 144.18, 7 | "MaxX": 25632.0, 8 | "MaxY": 14418.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2058, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Artist 15.6 Pro.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Artist 15.6 Pro", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 344.16, 6 | "Height": 193.59, 7 | "MaxX": 34416.0, 8 | "MaxY": 19359.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2317, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Artist 22HD.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Artist 22HD", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 476.64, 6 | "Height": 268.11, 7 | "MaxX": 38161.0, 8 | "MaxY": 21458.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 2047, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 21827, 23 | "ProductID": 71, 24 | "InputReportLength": 8, 25 | "OutputReportLength": null, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": null, 29 | "DeviceStrings": {}, 30 | "InitializationStrings": [ 31 | 100 32 | ] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": {} 37 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/CT1060.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen CT1060", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.505, 6 | "Height": 159.305, 7 | "MaxX": 50901.0, 8 | "MaxY": 31861.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 2354, 24 | "InputReportLength": 12, 25 | "OutputReportLength": 10, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": {} 37 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/CT430.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen CT430", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 121.92, 6 | "Height": 76.2, 7 | "MaxX": 24384.0, 8 | "MaxY": 15240.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 2352, 24 | "InputReportLength": 12, 25 | "OutputReportLength": 10, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/CT640.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen CT640", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 160.0, 6 | "Height": 101.6, 7 | "MaxX": 32000.0, 8 | "MaxY": 20320.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 2353, 24 | "InputReportLength": 12, 25 | "OutputReportLength": 12, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": {} 37 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Deco 01.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Deco 01", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 158.75, 7 | "MaxX": 25400.0, 8 | "MaxY": 15875.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 66, 26 | "InputReportLength": 8, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAC" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Deco 02.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Deco 02", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 223.52, 6 | "Height": 139.7, 7 | "MaxX": 22352.0, 8 | "MaxY": 13970.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2051, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAC" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Deco 03.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Deco 03", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 142.875, 7 | "MaxX": 50800.0, 8 | "MaxY": 28575.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 150, 26 | "InputReportLength": 8, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAC" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Deco Pro Medium.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Deco Pro Medium", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 278.99, 6 | "Height": 156.995, 7 | "MaxX": 55798.0, 8 | "MaxY": 31399.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2308, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 10, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Deco Pro Small.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Deco Pro Small", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 230.12, 6 | "Height": 129.54, 7 | "MaxX": 46024.0, 8 | "MaxY": 25908.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2313, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 10, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Deco mini4.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Deco mini4", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 101.6, 6 | "Height": 76.2, 7 | "MaxX": 20320.0, 8 | "MaxY": 15240.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2345, 26 | "InputReportLength": 12, 27 | "OutputReportLength": 12, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": {} 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Innovator 16.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Innovator 16", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 343.915, 6 | "Height": 193.545, 7 | "MaxX": 68783.0, 8 | "MaxY": 38709.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 8 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2348, 26 | "InputReportLength": 12, 27 | "OutputReportLength": 12, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArEE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star 05 V3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star 05 V3", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 203.2, 6 | "Height": 127.0, 7 | "MaxX": 40640.0, 8 | "MaxY": 20540.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 113, 26 | "InputReportLength": 8, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAC" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star 06.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star 06", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 120, 26 | "InputReportLength": 8, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAC" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star 06C.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star 06C", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 254.0, 6 | "Height": 152.4, 7 | "MaxX": 50800.0, 8 | "MaxY": 30480.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 6 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 98, 26 | "InputReportLength": 8, 27 | "OutputReportLength": 8, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G430S V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G430S V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 101.6, 6 | "Height": 76.2, 7 | "MaxX": 10160.0, 8 | "MaxY": 7620.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 2323, 24 | "InputReportLength": 12, 25 | "OutputReportLength": 12, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G430S.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G430S", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 101.6, 6 | "Height": 76.2, 7 | "MaxX": 20320.0, 8 | "MaxY": 15240.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 117, 24 | "InputReportLength": 8, 25 | "OutputReportLength": 8, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAC" 30 | ], 31 | "DeviceStrings": { 32 | "2": "G430S" 33 | }, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G540 Pro.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G540 Pro", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 136.8, 6 | "Height": 73.025, 7 | "MaxX": 54720.0, 8 | "MaxY": 29210.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 97, 24 | "InputReportLength": 8, 25 | "OutputReportLength": 8, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAC" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G540.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G540", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 228.6, 6 | "Height": 146.05, 7 | "MaxX": 45720.0, 8 | "MaxY": 29210.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 117, 24 | "InputReportLength": 8, 25 | "OutputReportLength": 8, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAC" 30 | ], 31 | "DeviceStrings": { 32 | "2": "TABLET G3 5x4" 33 | }, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G640 V2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G640 V2", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 160.0, 6 | "Height": 100.0, 7 | "MaxX": 15999.0, 8 | "MaxY": 9999.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 2324, 24 | "InputReportLength": 12, 25 | "OutputReportLength": 12, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAE" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G640.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G640", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 160.0, 6 | "Height": 100.0, 7 | "MaxX": 32000.0, 8 | "MaxY": 20000.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": null, 17 | "MouseButtons": null, 18 | "Touch": null 19 | }, 20 | "DigitizerIdentifiers": [ 21 | { 22 | "VendorID": 10429, 23 | "ProductID": 148, 24 | "InputReportLength": 8, 25 | "OutputReportLength": 8, 26 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 27 | "FeatureInitReport": null, 28 | "OutputInitReport": [ 29 | "ArAC" 30 | ], 31 | "DeviceStrings": {}, 32 | "InitializationStrings": [] 33 | } 34 | ], 35 | "AuxilaryDeviceIdentifiers": [], 36 | "Attributes": { 37 | "libinputoverride": "1" 38 | } 39 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G960.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G960", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 223.52, 6 | "Height": 139.7, 7 | "MaxX": 22352.0, 8 | "MaxY": 13970.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2336, 26 | "InputReportLength": 10, 27 | "OutputReportLength": 10, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G960S Plus.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G960S Plus", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 228.6, 6 | "Height": 152.4, 7 | "MaxX": 22860.0, 8 | "MaxY": 15240.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2328, 26 | "InputReportLength": 12, 27 | "OutputReportLength": 12, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Configurations/XP-Pen/Star G960S.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "XP-Pen Star G960S", 3 | "Specifications": { 4 | "Digitizer": { 5 | "Width": 228.8, 6 | "Height": 152.6, 7 | "MaxX": 22860.0, 8 | "MaxY": 15240.0 9 | }, 10 | "Pen": { 11 | "MaxPressure": 8191, 12 | "Buttons": { 13 | "ButtonCount": 2 14 | } 15 | }, 16 | "AuxiliaryButtons": { 17 | "ButtonCount": 4 18 | }, 19 | "MouseButtons": null, 20 | "Touch": null 21 | }, 22 | "DigitizerIdentifiers": [ 23 | { 24 | "VendorID": 10429, 25 | "ProductID": 2327, 26 | "InputReportLength": 12, 27 | "OutputReportLength": 12, 28 | "ReportParser": "OpenTabletDriver.Configurations.Parsers.XP_Pen.XP_PenReportParser", 29 | "FeatureInitReport": null, 30 | "OutputInitReport": [ 31 | "ArAE" 32 | ], 33 | "DeviceStrings": {}, 34 | "InitializationStrings": [] 35 | } 36 | ], 37 | "AuxilaryDeviceIdentifiers": [], 38 | "Attributes": { 39 | "libinputoverride": "1" 40 | } 41 | } -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/10moon/10moonReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin; 2 | using OpenTabletDriver.Plugin.Tablet; 3 | 4 | namespace OpenTabletDriver.Configurations.Parsers.TenMoon 5 | { 6 | public class TenMoonReportParser : IReportParser 7 | { 8 | public IDeviceReport Parse(byte[] report) 9 | { 10 | if (report[11] != 0xFF) 11 | return new TenMoonAuxReport(report); 12 | else 13 | return new TenMoonTabletReport(report); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Acepen/AcepenAuxReport.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using OpenTabletDriver.Plugin.Tablet; 3 | 4 | namespace OpenTabletDriver.Configurations.Parsers.Acepen 5 | { 6 | public struct AcepenAuxReport : IAuxReport 7 | { 8 | public AcepenAuxReport(byte[] report, bool[] auxState) 9 | { 10 | Raw = report; 11 | 12 | auxState[BitOperations.Log2(report[4])] = report[3].IsBitSet(0); 13 | AuxButtons = auxState; 14 | } 15 | 16 | public bool[] AuxButtons { set; get; } 17 | public byte[] Raw { set; get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Acepen/AcepenReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Acepen 4 | { 5 | public class AcepenReportParser : IReportParser 6 | { 7 | private const byte PEN_MODE = 0x41; 8 | private const byte AUX_MODE = 0x42; 9 | private readonly bool[] auxState = new bool[8]; 10 | 11 | public IDeviceReport Parse(byte[] report) 12 | { 13 | return report[1] switch 14 | { 15 | PEN_MODE => (report[2] & 0xf0) switch 16 | { 17 | 0xA0 => new AcepenTabletReport(report), 18 | _ => new DeviceReport(report) 19 | }, 20 | AUX_MODE => new AcepenAuxReport(report, auxState), 21 | _ => new DeviceReport(report) 22 | }; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Genius/GeniusButtonStripAuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Genius 4 | { 5 | public struct GeniusButtonStripAuxReport : IAuxReport 6 | { 7 | public GeniusButtonStripAuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | 11 | var auxByte = report[3]; 12 | AuxButtons = CreateButton(auxByte); 13 | } 14 | 15 | public byte[] Raw { set; get; } 16 | public bool[] AuxButtons { set; get; } 17 | 18 | private static bool[] CreateButton(byte auxByte) 19 | { 20 | var aux = new bool[12]; 21 | 22 | var activeIndex = (auxByte - 1) / 2; 23 | aux[activeIndex] = true; 24 | 25 | return aux; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Genius/GeniusReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Genius 4 | { 5 | public class GeniusReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] data) 8 | { 9 | return data[0] switch 10 | { 11 | 0x10 => new TabletReport(data), 12 | 0x11 => new GeniusMouseReport(data), 13 | _ => new DeviceReport(data) 14 | }; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Genius/GeniusReportParserV2.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Genius 4 | { 5 | public class GeniusReportParserV2 : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] data) 8 | { 9 | return data[0] switch 10 | { 11 | 0x02 => new GeniusTabletReport(data), 12 | 0x05 => new GeniusButtonStripAuxReport(data), 13 | _ => new DeviceReport(data) 14 | }; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Huion/GianoReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Configurations.Parsers.UCLogic; 2 | using OpenTabletDriver.Plugin.Tablet; 3 | 4 | namespace OpenTabletDriver.Configurations.Parsers.Huion 5 | { 6 | public class GianoReportParser : IReportParser 7 | { 8 | public IDeviceReport Parse(byte[] data) 9 | { 10 | if (data[1].IsBitSet(5) && data[1].IsBitSet(6)) 11 | return new UCLogicAuxReport(data); 12 | else 13 | return new GianoReport(data); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/SkipByteTabletReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers 4 | { 5 | public class SkipByteTabletReportParser : TabletReportParser 6 | { 7 | public override IDeviceReport Parse(byte[] data) 8 | { 9 | return base.Parse(data[1..^0]); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/UCLogic/UCLogicAuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.UCLogic 4 | { 5 | public struct UCLogicAuxReport : IAuxReport 6 | { 7 | public UCLogicAuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | 11 | AuxButtons = new bool[] 12 | { 13 | report[4].IsBitSet(0), 14 | report[4].IsBitSet(1), 15 | report[4].IsBitSet(2), 16 | report[4].IsBitSet(3), 17 | report[4].IsBitSet(4), 18 | report[4].IsBitSet(5), 19 | report[4].IsBitSet(6), 20 | report[4].IsBitSet(7), 21 | report[5].IsBitSet(0), 22 | report[5].IsBitSet(1), 23 | report[5].IsBitSet(2), 24 | report[5].IsBitSet(3), 25 | }; 26 | } 27 | 28 | public bool[] AuxButtons { set; get; } 29 | public byte[] Raw { set; get; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/UCLogic/UCLogicReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.UCLogic 4 | { 5 | public class UCLogicReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] data) 8 | { 9 | if (data[1].IsBitSet(6)) 10 | return new UCLogicAuxReport(data); 11 | else 12 | return new TabletReport(data); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/UCLogic/UCLogicTiltReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.UCLogic 4 | { 5 | public class UCLogicTiltReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] data) 8 | { 9 | if (data[1].IsBitSet(6)) 10 | return new UCLogicAuxReport(data); 11 | else 12 | return new TiltTabletReport(data); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Veikk/VeikkReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Veikk 4 | { 5 | public class VeikkReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] report) 8 | { 9 | if (report[2].IsBitSet(5)) 10 | return new VeikkTabletReport(report); 11 | 12 | return new DeviceReport(report); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/ViewSonic/WoodPadParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.ViewSonic 4 | { 5 | public class WoodPadReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] report) 8 | { 9 | if ((report[9] & 0b11) == 0b11) 10 | return new WoodPadReport(report); 11 | 12 | return new DeviceReport(report); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Bamboo/BambooAuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.Bamboo 4 | { 5 | public struct BambooAuxReport : IAuxReport 6 | { 7 | public BambooAuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | 11 | var auxByte = report[7]; 12 | AuxButtons = new bool[] 13 | { 14 | auxByte.IsBitSet(3), 15 | auxByte.IsBitSet(4), 16 | auxByte.IsBitSet(5), 17 | auxByte.IsBitSet(6), 18 | }; 19 | 20 | // wheel = report[8] & 0x7f 21 | } 22 | 23 | public byte[] Raw { set; get; } 24 | public bool[] AuxButtons { set; get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Intuos/IntuosReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.Intuos 4 | { 5 | public class IntuosReportParser : IReportParser 6 | { 7 | public virtual IDeviceReport Parse(byte[] report) 8 | { 9 | return report[0] switch 10 | { 11 | 0x02 => GetToolReport(report), 12 | _ => new DeviceReport(report) 13 | }; 14 | } 15 | 16 | private IDeviceReport GetToolReport(byte[] report) 17 | { 18 | if (report[1].IsBitSet(6)) 19 | return new IntuosTabletReport(report); 20 | 21 | return new DeviceReport(report); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Intuos/WacomDriverIntuosReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.Intuos 4 | { 5 | public class WacomDriverIntuosReportParser : IntuosReportParser 6 | { 7 | public override IDeviceReport Parse(byte[] report) 8 | { 9 | return base.Parse(report[1..^0]); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Intuos3/Intuos3AuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.Intuos3 4 | { 5 | public struct Intuos3AuxReport : IAuxReport 6 | { 7 | public Intuos3AuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | AuxButtons = new bool[] 11 | { 12 | report[5].IsBitSet(0), 13 | report[5].IsBitSet(1), 14 | report[5].IsBitSet(2), 15 | report[5].IsBitSet(3), 16 | report[6].IsBitSet(0), 17 | report[6].IsBitSet(1), 18 | report[6].IsBitSet(2), 19 | report[6].IsBitSet(3) 20 | }; 21 | } 22 | 23 | public bool[] AuxButtons { set; get; } 24 | public byte[] Raw { set; get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Intuos3/WacomDriverIntuos3ReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.Intuos3 4 | { 5 | public class WacomDriverIntuos3ReportParser : Intuos3ReportParser 6 | { 7 | public override IDeviceReport Parse(byte[] data) 8 | { 9 | return base.Parse(data[1..^0]); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Intuos4/Intuos4AuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.Intuos4 4 | { 5 | public struct Intuos4AuxReport : IAuxReport 6 | { 7 | public Intuos4AuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | 11 | AuxButtons = new bool[] 12 | { 13 | (report[3] & (1 << 0)) != 0, 14 | (report[3] & (1 << 1)) != 0, 15 | (report[3] & (1 << 2)) != 0, 16 | (report[3] & (1 << 3)) != 0, 17 | (report[3] & (1 << 4)) != 0, 18 | (report[3] & (1 << 5)) != 0, 19 | (report[3] & (1 << 6)) != 0, 20 | (report[3] & (1 << 7)) != 0 21 | }; 22 | } 23 | 24 | public byte[] Raw { set; get; } 25 | public bool[] AuxButtons { set; get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/IntuosV1/IntuosV1AuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.IntuosV1 4 | { 5 | public struct IntuosV1AuxReport : IAuxReport 6 | { 7 | public IntuosV1AuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | 11 | var auxByte = report[4]; 12 | AuxButtons = new bool[] 13 | { 14 | auxByte.IsBitSet(0), 15 | auxByte.IsBitSet(1), 16 | auxByte.IsBitSet(2), 17 | auxByte.IsBitSet(3), 18 | auxByte.IsBitSet(4), 19 | auxByte.IsBitSet(5), 20 | auxByte.IsBitSet(6), 21 | auxByte.IsBitSet(7), 22 | }; 23 | } 24 | 25 | public byte[] Raw { set; get; } 26 | public bool[] AuxButtons { set; get; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/IntuosV1/WacomDriverIntuosV1ReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.IntuosV1 4 | { 5 | public class WacomDriverIntuosV1ReportParser : IntuosV1ReportParser 6 | { 7 | public override IDeviceReport Parse(byte[] data) 8 | { 9 | return base.Parse(data[1..^0]); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/IntuosV2/IntuosV2AuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.IntuosV2 4 | { 5 | public struct IntuosV2AuxReport : IAuxReport 6 | { 7 | public IntuosV2AuxReport(byte[] report) 8 | { 9 | Raw = report; 10 | 11 | var auxByte = report[1]; 12 | AuxButtons = new bool[] 13 | { 14 | auxByte.IsBitSet(0), 15 | auxByte.IsBitSet(1), 16 | auxByte.IsBitSet(2), 17 | auxByte.IsBitSet(3), 18 | auxByte.IsBitSet(4), 19 | auxByte.IsBitSet(5), 20 | auxByte.IsBitSet(6), 21 | auxByte.IsBitSet(7), 22 | }; 23 | } 24 | 25 | public byte[] Raw { set; get; } 26 | public bool[] AuxButtons { set; get; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/IntuosV2/IntuosV2ReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | using OpenTabletDriver.Plugin.Tablet.Touch; 3 | 4 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.IntuosV2 5 | { 6 | public class IntuosV2ReportParser : IReportParser 7 | { 8 | public virtual IDeviceReport Parse(byte[] data) 9 | { 10 | if (data.Length < 10) 11 | { 12 | return new DeviceReport(data); 13 | } 14 | else 15 | { 16 | return data[0] switch 17 | { 18 | 0x10 => new IntuosV2Report(data), 19 | 0x11 => new IntuosV2AuxReport(data), 20 | 0x21 => new IntuosV2TouchReport(data, ref prevTouches), 21 | 0xD2 => new IntuosV2TouchReport(data, ref prevTouches), 22 | _ => new DeviceReport(data) 23 | }; 24 | } 25 | } 26 | 27 | private TouchPoint[] prevTouches; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/IntuosV2/WacomDriverIntuosV2ReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.Wacom.IntuosV2 4 | { 5 | public class WacomDriverIntuosV2ReportParser : IntuosV2ReportParser 6 | { 7 | public override IDeviceReport Parse(byte[] data) 8 | { 9 | return base.Parse(data[1..^0]); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/Wacom/Wacom64bAuxReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | using OpenTabletDriver.Plugin.Tablet.Touch; 3 | 4 | namespace OpenTabletDriver.Configurations.Parsers.Wacom 5 | { 6 | public class Wacom64bAuxReportParser : IReportParser 7 | { 8 | public virtual IDeviceReport Parse(byte[] data) 9 | { 10 | return new WacomTouchReport(data, ref prevTouches); 11 | } 12 | 13 | private TouchPoint[] prevTouches; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/XP_Pen/XP_PenAuxReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.XP_Pen 4 | { 5 | public struct XP_PenAuxReport : IAuxReport 6 | { 7 | public XP_PenAuxReport(byte[] report, int index = 2) 8 | { 9 | Raw = report; 10 | 11 | AuxButtons = new bool[] 12 | { 13 | report[index].IsBitSet(0), 14 | report[index].IsBitSet(1), 15 | report[index].IsBitSet(2), 16 | report[index].IsBitSet(3), 17 | report[index].IsBitSet(4), 18 | report[index].IsBitSet(5), 19 | report[index].IsBitSet(6), 20 | report[index].IsBitSet(7), 21 | report[index + 1].IsBitSet(0), 22 | }; 23 | } 24 | 25 | public bool[] AuxButtons { set; get; } 26 | public byte[] Raw { set; get; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/XP_Pen/XP_PenOffsetAuxReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.XP_Pen 4 | { 5 | public class XP_PenOffsetAuxReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] report) 8 | { 9 | if (report[1] == 0xC0) 10 | return new OutOfRangeReport(report); 11 | 12 | if (report[1].IsBitSet(5)) 13 | return new XP_PenAuxReport(report, 4); 14 | else if (report.Length >= 10) 15 | return new XP_PenTabletReport(report); 16 | else 17 | return new TabletReport(report); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/XP_Pen/XP_PenOffsetPressureReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.XP_Pen 4 | { 5 | public class XP_PenOffsetPressureReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] report) 8 | { 9 | if (report[1] == 0xC0) 10 | return new OutOfRangeReport(report); 11 | 12 | if (report[1].IsBitSet(4)) 13 | return new XP_PenAuxReport(report); 14 | 15 | if (report.Length >= 12) 16 | return new XP_PenTabletPressureOffsetOverflowReport(report); 17 | if (report.Length >= 10) 18 | return new XP_PenPressureOffsetTiltTabletReport(report); 19 | else 20 | return new XP_PenPressureOffsetTabletReport(report); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/XP_Pen/XP_PenReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Configurations.Parsers.XP_Pen 4 | { 5 | public class XP_PenReportParser : IReportParser 6 | { 7 | public IDeviceReport Parse(byte[] report) 8 | { 9 | if (report[1] == 0xC0) 10 | return new OutOfRangeReport(report); 11 | 12 | if (report[1].IsBitSet(4)) 13 | return new XP_PenAuxReport(report); 14 | 15 | if (report.Length >= 12) 16 | return new XP_PenTabletOverflowReport(report); 17 | else if (report.Length >= 10) 18 | return new XP_PenTabletReport(report); 19 | else 20 | return new TabletReport(report); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.Configurations/Parsers/XenceLabs/XenceLabsReportParser.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Configurations.Parsers.XP_Pen; 2 | using OpenTabletDriver.Plugin.Tablet; 3 | 4 | namespace OpenTabletDriver.Configurations.Parsers.XenceLabs 5 | { 6 | public class XenceLabsReportParser : IReportParser 7 | { 8 | public IDeviceReport Parse(byte[] report) 9 | { 10 | var reportByte = report[1]; 11 | 12 | if ((reportByte & 0xf0) == 0xf0) 13 | return new XP_PenAuxReport(report); 14 | else if (reportByte.IsBitSet(5)) 15 | return new XenceLabsTabletReport(report); 16 | 17 | return new DeviceReport(report); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OpenTabletDriver.Console/OpenTabletDriver.Console.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(FrameworkBase) 6 | VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200 7 | 8 | 9 | 10 | true 11 | otd 12 | ./nupkg 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Console/Program.IPC.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using OpenTabletDriver.Desktop.Contracts; 3 | using OpenTabletDriver.Desktop.RPC; 4 | 5 | namespace OpenTabletDriver.Console 6 | { 7 | partial class Program 8 | { 9 | public static readonly RpcClient Driver = new RpcClient("OpenTabletDriver.Daemon"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Daemon/OpenTabletDriver.Daemon.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(FrameworkBase) 6 | VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Binding/BindingState.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Desktop.Reflection; 2 | using OpenTabletDriver.Plugin; 3 | using OpenTabletDriver.Plugin.Tablet; 4 | 5 | namespace OpenTabletDriver.Desktop.Binding 6 | { 7 | public class BindingState 8 | { 9 | public IBinding Binding { set; get; } 10 | public bool State { protected set; get; } 11 | 12 | protected bool PreviousState { set; get; } 13 | 14 | public virtual void Invoke(TabletReference tablet, IDeviceReport report, bool newState) 15 | { 16 | if (Binding is IStateBinding stateBinding) 17 | { 18 | if (newState && !PreviousState) 19 | stateBinding.Press(tablet, report); 20 | else if (!newState && PreviousState) 21 | stateBinding.Release(tablet, report); 22 | } 23 | 24 | PreviousState = newState; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Converters/VersionConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace OpenTabletDriver.Desktop.Converters 5 | { 6 | public class VersionConverter : JsonConverter 7 | { 8 | public override Version ReadJson(JsonReader reader, Type objectType, Version existingValue, bool hasExistingValue, JsonSerializer serializer) 9 | { 10 | return new Version((string)reader.Value); 11 | } 12 | 13 | public override void WriteJson(JsonWriter writer, Version value, JsonSerializer serializer) 14 | { 15 | writer.WriteValue(value.ToString()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/DesktopReportParserProvider.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Desktop.Reflection; 2 | using OpenTabletDriver.Plugin.Components; 3 | using OpenTabletDriver.Plugin.Tablet; 4 | 5 | namespace OpenTabletDriver.Desktop 6 | { 7 | public class DesktopReportParserProvider : IReportParserProvider 8 | { 9 | public IReportParser GetReportParser(string reportParserName) 10 | { 11 | return AppInfo.PluginManager.ConstructObject>(reportParserName); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Interop/Display/Display.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using OpenTabletDriver.Plugin.Platform.Display; 3 | 4 | namespace OpenTabletDriver.Desktop.Interop.Display 5 | { 6 | internal class Display : IDisplay 7 | { 8 | internal Display(float width, float height, Vector2 position, int index = 0) 9 | { 10 | Width = width; 11 | Height = height; 12 | Position = position; 13 | Index = index; 14 | } 15 | 16 | public int Index { private set; get; } 17 | public float Width { private set; get; } 18 | public float Height { private set; get; } 19 | public Vector2 Position { private set; get; } 20 | 21 | public override string ToString() 22 | { 23 | return $"Display {Index} ({Width}x{Height}@{Position})"; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Interop/Display/WaylandOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using OpenTabletDriver.Plugin.Platform.Display; 3 | using WaylandNET.Client.Protocol; 4 | 5 | namespace OpenTabletDriver.Desktop.Interop.Display 6 | { 7 | public class WaylandOutput : IDisplay 8 | { 9 | internal WlOutput WlOutput { set; get; } 10 | internal ZxdgOutputV1 XdgOutput { set; get; } 11 | 12 | public int Index { set; get; } 13 | public float Width { set; get; } 14 | public float Height { set; get; } 15 | public Vector2 Position { set; get; } 16 | public string Name { set; get; } 17 | public string Description { set; get; } 18 | 19 | public override string ToString() => $"{Name} {Description} ({Width}x{Height}@{Position})"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Interop/Input/Absolute/MacOSAbsolutePointer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | using OpenTabletDriver.Native.OSX; 4 | using OpenTabletDriver.Native.OSX.Generic; 5 | using OpenTabletDriver.Plugin.Platform.Pointer; 6 | 7 | namespace OpenTabletDriver.Desktop.Interop.Input.Absolute 8 | { 9 | using static OSX; 10 | 11 | public class MacOSAbsolutePointer : MacOSVirtualMouse, IAbsolutePointer 12 | { 13 | public void SetPosition(Vector2 pos) 14 | { 15 | var newPos = new CGPoint(pos.X, pos.Y) - offset; 16 | var mouseEventRef = CGEventCreateMouseEvent(IntPtr.Zero, moveEvent, newPos, pressedButtons); 17 | CGEventPost(CGEventTapLocation.kCGHIDEventTap, mouseEventRef); 18 | CFRelease(mouseEventRef); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Interop/Input/Relative/MacOSRelativePointer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | using OpenTabletDriver.Native.OSX; 4 | using OpenTabletDriver.Native.OSX.Generic; 5 | using OpenTabletDriver.Plugin.Platform.Pointer; 6 | 7 | namespace OpenTabletDriver.Desktop.Interop.Input.Relative 8 | { 9 | using static OSX; 10 | 11 | public class MacOSRelativePointer : Input.MacOSVirtualMouse, IRelativePointer 12 | { 13 | public void SetPosition(Vector2 delta) 14 | { 15 | var lastPos = base.GetPosition(); 16 | var newPos = lastPos + delta; 17 | var cgPt = new CGPoint(newPos.X, newPos.Y) - offset; 18 | var mouseEventRef = CGEventCreateMouseEvent(IntPtr.Zero, moveEvent, cgPt, pressedButtons); 19 | CGEventPost(CGEventTapLocation.kCGHIDEventTap, mouseEventRef); 20 | CFRelease(mouseEventRef); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Interop/Input/Relative/WindowsRelativePointer.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using OpenTabletDriver.Native.Windows; 3 | using OpenTabletDriver.Native.Windows.Input; 4 | using OpenTabletDriver.Plugin.Platform.Pointer; 5 | 6 | namespace OpenTabletDriver.Desktop.Interop.Input.Relative 7 | { 8 | using static Windows; 9 | 10 | public class WindowsRelativePointer : Input.WindowsVirtualMouse, IRelativePointer 11 | { 12 | private Vector2 error; 13 | 14 | public void SetPosition(Vector2 delta) 15 | { 16 | delta += error; 17 | error = new Vector2(delta.X % 1, delta.Y % 1); 18 | 19 | inputs[0].U.mi.dwFlags = MOUSEEVENTF.MOVE; 20 | inputs[0].U.mi.dx = (int)delta.X; 21 | inputs[0].U.mi.dy = (int)delta.Y; 22 | SendInput(1, inputs, INPUT.Size); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Output/AbsoluteMode.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Attributes; 2 | using OpenTabletDriver.Plugin.DependencyInjection; 3 | using OpenTabletDriver.Plugin.Output; 4 | using OpenTabletDriver.Plugin.Platform.Pointer; 5 | 6 | namespace OpenTabletDriver.Desktop.Output 7 | { 8 | [PluginName("Absolute Mode")] 9 | public class AbsoluteMode : AbsoluteOutputMode, IPointerProvider 10 | { 11 | [Resolved] 12 | public override IAbsolutePointer Pointer { set; get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Output/LinuxArtistMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using OpenTabletDriver.Plugin; 3 | using OpenTabletDriver.Plugin.Attributes; 4 | using OpenTabletDriver.Plugin.DependencyInjection; 5 | using OpenTabletDriver.Plugin.Output; 6 | using OpenTabletDriver.Plugin.Platform.Pointer; 7 | 8 | namespace OpenTabletDriver.Desktop.Output 9 | { 10 | [PluginName("Artist Mode"), SupportedPlatform(PluginPlatform.Linux)] 11 | public class LinuxArtistMode : AbsoluteOutputMode, IPointerProvider 12 | { 13 | [Resolved] 14 | public IPressureHandler VirtualTablet { get; set; } 15 | 16 | public override IAbsolutePointer Pointer 17 | { 18 | set => throw new NotSupportedException(); 19 | get => (IAbsolutePointer)VirtualTablet; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Output/RelativeMode.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Attributes; 2 | using OpenTabletDriver.Plugin.DependencyInjection; 3 | using OpenTabletDriver.Plugin.Output; 4 | using OpenTabletDriver.Plugin.Platform.Pointer; 5 | 6 | namespace OpenTabletDriver.Desktop.Output 7 | { 8 | [PluginName("Relative Mode")] 9 | public class RelativeMode : RelativeOutputMode, IPointerProvider 10 | { 11 | [Resolved] 12 | public override IRelativePointer Pointer { set; get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Preset.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace OpenTabletDriver.Desktop 4 | { 5 | public class Preset 6 | { 7 | public Preset(string name, Settings settings) 8 | { 9 | Name = name; 10 | Settings = settings; 11 | } 12 | 13 | public string Name { get; } 14 | private Settings Settings; 15 | 16 | public Settings GetSettings() 17 | { 18 | return JsonConvert.DeserializeObject(JsonConvert.SerializeObject(Settings)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/RPC/DebugReportData.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Text.Json.Serialization; 3 | using Newtonsoft.Json.Linq; 4 | using OpenTabletDriver.Plugin.Tablet; 5 | 6 | namespace OpenTabletDriver.Desktop.RPC 7 | { 8 | public class DebugReportData 9 | { 10 | [JsonConstructor] 11 | public DebugReportData() 12 | { 13 | } 14 | 15 | public DebugReportData(TabletReference tablet, IDeviceReport report) 16 | { 17 | this.Tablet = tablet; 18 | this.Data = JToken.FromObject(report); 19 | this.Path = report.GetType().FullName; 20 | } 21 | 22 | public TabletReference Tablet { set; get; } 23 | public string Path { set; get; } 24 | public JToken Data { set; get; } 25 | 26 | public object ToObject() 27 | { 28 | var type = AppInfo.PluginManager.PluginTypes.First(t => t.FullName == Path); 29 | return Data.ToObject(type); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Reflection/IServiceManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Desktop.Reflection 4 | { 5 | public interface IServiceManager : IServiceProvider 6 | { 7 | bool AddService(Func value); 8 | void ResetServices(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Reflection/PluginContext.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Reflection; 3 | using System.Runtime.Loader; 4 | 5 | namespace OpenTabletDriver.Desktop.Reflection 6 | { 7 | public class PluginContext : AssemblyLoadContext 8 | { 9 | protected const string PLUGIN_ASSEMBLY_NAMESPACE = nameof(OpenTabletDriver.Plugin); 10 | protected static readonly Assembly PluginAssembly = Default.Assemblies.FirstOrDefault(asm => asm.GetName().FullName == PLUGIN_ASSEMBLY_NAMESPACE); 11 | 12 | protected override Assembly Load(AssemblyName assemblyName) 13 | { 14 | // Reference shared dependency instead of duplicating it into this PluginContext 15 | return assemblyName.Name == PLUGIN_ASSEMBLY_NAMESPACE ? PluginAssembly : null; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/Updater/IUpdater.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Octokit; 3 | 4 | namespace OpenTabletDriver.Desktop.Updater 5 | { 6 | public interface IUpdater 7 | { 8 | Task CheckForUpdates(); 9 | Task GetRelease(); 10 | Task InstallUpdate(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Desktop/ViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace OpenTabletDriver.Desktop 5 | { 6 | public class ViewModel : INotifyPropertyChanged 7 | { 8 | public event PropertyChangedEventHandler PropertyChanged; 9 | 10 | protected void RaiseAndSetIfChanged(ref T obj, T newValue, [CallerMemberName] string propertyName = "") 11 | { 12 | obj = newValue; 13 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 14 | } 15 | 16 | protected void RaiseChanged([CallerMemberName] string propertyName = "") 17 | { 18 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 19 | } 20 | 21 | public void AllPropertiesChanged() 22 | { 23 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(null)); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenTabletDriver.Linux.slnf: -------------------------------------------------------------------------------- 1 | { 2 | "solution": { 3 | "path": ".\\OpenTabletDriver.sln", 4 | "projects": [ 5 | ".\\OpenTabletDriver\\OpenTabletDriver.csproj", 6 | ".\\OpenTabletDriver.Benchmarks\\OpenTabletDriver.Benchmarks.csproj", 7 | ".\\OpenTabletDriver.Configurations\\OpenTabletDriver.Configurations.csproj", 8 | ".\\OpenTabletDriver.Console\\OpenTabletDriver.Console.csproj", 9 | ".\\OpenTabletDriver.Daemon\\OpenTabletDriver.Daemon.csproj", 10 | ".\\OpenTabletDriver.Desktop\\OpenTabletDriver.Desktop.csproj", 11 | ".\\OpenTabletDriver.Native\\OpenTabletDriver.Native.csproj", 12 | ".\\OpenTabletDriver.Plugin\\OpenTabletDriver.Plugin.csproj", 13 | ".\\OpenTabletDriver.Tests\\OpenTabletDriver.Tests.csproj", 14 | ".\\OpenTabletDriver.Tools.udev\\OpenTabletDriver.Tools.udev.csproj", 15 | ".\\OpenTabletDriver.UX\\OpenTabletDriver.UX.csproj", 16 | ".\\OpenTabletDriver.UX.Gtk\\OpenTabletDriver.UX.Gtk.csproj" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.MacOS.slnf: -------------------------------------------------------------------------------- 1 | { 2 | "solution": { 3 | "path": ".\\OpenTabletDriver.sln", 4 | "projects": [ 5 | ".\\OpenTabletDriver\\OpenTabletDriver.csproj", 6 | ".\\OpenTabletDriver.Benchmarks\\OpenTabletDriver.Benchmarks.csproj", 7 | ".\\OpenTabletDriver.Configurations\\OpenTabletDriver.Configurations.csproj", 8 | ".\\OpenTabletDriver.Console\\OpenTabletDriver.Console.csproj", 9 | ".\\OpenTabletDriver.Daemon\\OpenTabletDriver.Daemon.csproj", 10 | ".\\OpenTabletDriver.Desktop\\OpenTabletDriver.Desktop.csproj", 11 | ".\\OpenTabletDriver.Native\\OpenTabletDriver.Native.csproj", 12 | ".\\OpenTabletDriver.Plugin\\OpenTabletDriver.Plugin.csproj", 13 | ".\\OpenTabletDriver.Tests\\OpenTabletDriver.Tests.csproj", 14 | ".\\OpenTabletDriver.UX\\OpenTabletDriver.UX.csproj", 15 | ".\\OpenTabletDriver.UX.MacOS\\OpenTabletDriver.UX.MacOS.csproj" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Evdev/EventType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Linux.Evdev 2 | { 3 | public enum EventType : uint 4 | { 5 | EV_SYN = 0x00, 6 | EV_KEY = 0x01, 7 | EV_REL = 0x02, 8 | EV_ABS = 0x03, 9 | INPUT_PROP_DIRECT = 0x01 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Evdev/Structs/input_absinfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Linux.Evdev.Structs 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct input_absinfo 7 | { 8 | public int value; 9 | public int minimum; 10 | public int maximum; 11 | public int fuzz; 12 | public int flat; 13 | public int resolution; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/ClockID.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Linux.Timers 2 | { 3 | public enum ClockID 4 | { 5 | RealTime, 6 | Monotonic, 7 | ProcessCPUTimeID, 8 | ThreadCPUTimeID, 9 | MonotonicRaw, 10 | RealTimeCourse, 11 | MonotonicCourse, 12 | BootTime, 13 | RealTimeAlarm, 14 | BootTimeAlarm, 15 | SGICycle, 16 | TAI 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/SigEv.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Linux.Timers 2 | { 3 | public enum SigEv 4 | { 5 | Signal, 6 | None, 7 | Thread, 8 | ThreadID 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/Structs/SigEvThread.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Linux.Timers.Structs 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | public struct SigEvThread 8 | { 9 | public IntPtr function; 10 | public IntPtr attribute; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/Structs/SigEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Linux.Timers.Structs 4 | { 5 | [StructLayout(LayoutKind.Explicit, Size = 64, Pack = 1)] 6 | public struct SigEvent 7 | { 8 | [FieldOffset(0)] 9 | public SigVal value; 10 | 11 | [FieldOffset(8)] 12 | public int signo; 13 | 14 | [FieldOffset(12)] 15 | public SigEv notify; 16 | 17 | [FieldOffset(16)] 18 | public int tid; 19 | 20 | [FieldOffset(16)] 21 | public SigEvThread thread; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/Structs/SigVal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Linux.Timers.Structs 5 | { 6 | [StructLayout(LayoutKind.Explicit)] 7 | public struct SigVal 8 | { 9 | [FieldOffset(0)] 10 | public int sival_int; 11 | 12 | [FieldOffset(0)] 13 | public IntPtr sival_ptr; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/Structs/TimeSpec.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Linux.Timers.Structs 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct TimeSpec 7 | { 8 | public long sec; 9 | public long nsec; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/Structs/TimerSpec.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Linux.Timers.Structs 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct TimerSpec 7 | { 8 | public TimeSpec interval; 9 | public TimeSpec value; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Timers/TimerFlag.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Linux.Timers 2 | { 3 | public enum TimerFlag 4 | { 5 | Default, 6 | AbsoluteTime 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Xorg/XRRMonitorInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Linux.Xorg 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | public struct XRRMonitorInfo 8 | { 9 | public IntPtr Name; 10 | public int Primary; 11 | public int Automatic; 12 | public int NOutput; 13 | public int X; 14 | public int Y; 15 | public int Width; 16 | public int Height; 17 | public int MWidth; 18 | public int MHeight; 19 | public IntPtr Outputs; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Linux/Xorg/XRandr.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Linux.Xorg 5 | { 6 | using Display = IntPtr; 7 | using Window = IntPtr; 8 | 9 | public static class XRandr 10 | { 11 | private const string libXRandr = "libXrandr"; 12 | 13 | [DllImport(libXRandr, EntryPoint = "XRRGetMonitors")] 14 | public unsafe extern static XRRMonitorInfo* XRRGetMonitors(Display dpy, Window window, bool get_active, out int nmonitors); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OSX/Generic/CGEventTapLocation.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.OSX.Generic 2 | { 3 | public enum CGEventTapLocation 4 | { 5 | kCGHIDEventTap = 0, 6 | kCGSessionEventTap = 1, 7 | kCGAnnotatedSessionEventTap = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OSX/Generic/CGEventType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.OSX 2 | { 3 | public enum CGEventType : uint 4 | { 5 | kCGEventNull = 0, 6 | kCGEventLeftMouseDown = 1, 7 | kCGEventLeftMouseUp = 2, 8 | kCGEventRightMouseDown = 3, 9 | kCGEventRightMouseUp = 4, 10 | kCGEventMouseMoved = 5, 11 | kCGEventLeftMouseDragged = 6, 12 | kCGEventRightMouseDragged = 7, 13 | kCGEventKeyDown = 10, 14 | kCGEventKeyUp = 11, 15 | kCGEventOtherMouseDown = 25, 16 | kCGEventOtherMouseUp = 26, 17 | kCGEventOtherMouseDragged = 27 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OSX/Generic/CGPoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics.CodeAnalysis; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace OpenTabletDriver.Native.OSX 6 | { 7 | [StructLayout(LayoutKind.Sequential)] 8 | public struct CGPoint 9 | { 10 | public double x; 11 | public double y; 12 | 13 | public CGPoint(double x, double y) 14 | { 15 | this.x = x; 16 | this.y = y; 17 | } 18 | 19 | public static CGPoint operator +(CGPoint a, CGPoint b) 20 | { 21 | return new CGPoint(a.x + b.x, a.y + b.y); 22 | } 23 | 24 | public static CGPoint operator -(CGPoint a, CGPoint b) 25 | { 26 | return new CGPoint(a.x - b.x, a.y - b.y); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OSX/Generic/CGRect.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.OSX.Generic 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct CGRect 7 | { 8 | public CGPoint origin; 9 | public CGSize size; 10 | 11 | public CGRect(CGPoint origin, CGSize size) 12 | { 13 | this.origin = origin; 14 | this.size = size; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OSX/Generic/CGSize.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.OSX.Generic 2 | { 3 | public struct CGSize 4 | { 5 | public double width; 6 | public double height; 7 | 8 | public CGSize(double width, double height) 9 | { 10 | this.width = width; 11 | this.height = height; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OSX/Input/CGMouseButton.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.OSX.Input 2 | { 3 | public enum CGMouseButton : uint 4 | { 5 | kCGMouseButtonLeft = 0, 6 | kCGMouseButtonRight = 1, 7 | kCGMouseButtonCenter = 2, 8 | kCGMouseButtonBackward = 3, 9 | kCGMouseButtonForward = 4, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/OpenTabletDriver.Native.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0;$(FrameworkBase) 5 | true 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/CM/CM_NOTIFY_ACTION.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.CM 2 | { 3 | public enum CM_NOTIFY_ACTION 4 | { 5 | DEVICEINTERFACEARRIVAL, 6 | DEVICEINTERFACEREMOVAL, 7 | DEVICEQUERYREMOVE, 8 | DEVICEQUERYREMOVEFAILED, 9 | DEVICEREMOVEPENDING, 10 | DEVICEREMOVECOMPLETE, 11 | DEVICECUSTOMEVENT, 12 | DEVICEINSTANCEENUMERATED, 13 | DEVICEINSTANCESTARTED, 14 | DEVICEINSTANCEREMOVED, 15 | MAX 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/CM/CM_NOTIFY_EVENT_DATA.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Windows.CM 5 | { 6 | [StructLayout(LayoutKind.Explicit)] 7 | public unsafe ref struct CM_NOTIFY_EVENT_DATA 8 | { 9 | [FieldOffset(0)] 10 | public CM_NOTIFY_FILTER_TYPE FilterType; 11 | 12 | [FieldOffset(4)] 13 | public uint Reserved; 14 | 15 | [FieldOffset(8)] 16 | public Guid ClassGuid; 17 | 18 | [FieldOffset(24)] 19 | public fixed char SymbolicLink[1]; 20 | 21 | [FieldOffset(8)] 22 | public Guid EventGuid; 23 | 24 | [FieldOffset(24)] 25 | public int NameOffset; 26 | 27 | [FieldOffset(28)] 28 | public int DataSize; 29 | 30 | [FieldOffset(32)] 31 | public fixed byte Data[1]; 32 | 33 | [FieldOffset(8)] 34 | public fixed char InstanceId[1]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/CM/CM_NOTIFY_FILTER_FLAG.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.CM 2 | { 3 | public enum CM_NOTIFY_FILTER_FLAG 4 | { 5 | DEFAULT, 6 | ALL_INTERFACE_CLASSES, 7 | ALL_DEVICE_INSTANCES 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/CM/CM_NOTIFY_FILTER_TYPE.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.CM 2 | { 3 | public enum CM_NOTIFY_FILTER_TYPE 4 | { 5 | DEVICEINTERFACE = 0, 6 | DEVICEHANDLE, 7 | DEVICEINSTANCE, 8 | MAX 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/CM/SafeCmNotificationHandle.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32.SafeHandles; 2 | using OpenTabletDriver.Native.Windows.CM; 3 | using static OpenTabletDriver.Native.Windows.CfgMgr32; 4 | 5 | namespace OpenTabletDriver.Devices.WinUSB 6 | { 7 | public class SafeCmNotificationHandle : SafeHandleZeroOrMinusOneIsInvalid 8 | { 9 | public SafeCmNotificationHandle() 10 | : base(true) 11 | { 12 | } 13 | 14 | protected override bool ReleaseHandle() 15 | { 16 | return CM_Unregister_Notification(handle) == CR.SUCCESS; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/CfgMgr32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using OpenTabletDriver.Devices.WinUSB; 4 | using OpenTabletDriver.Native.Windows.CM; 5 | 6 | namespace OpenTabletDriver.Native.Windows 7 | { 8 | public static class CfgMgr32 9 | { 10 | public unsafe delegate int CM_NOTIFY_CALLBACK(IntPtr hNotify, IntPtr Context, CM_NOTIFY_ACTION Action, CM_NOTIFY_EVENT_DATA* EventData, int EventDataSize); 11 | 12 | [DllImport("cfgmgr32.dll", CharSet = CharSet.Unicode)] 13 | public static extern CR CM_Register_Notification(in CM_NOTIFY_FILTER pFilter, IntPtr pContext, CM_NOTIFY_CALLBACK pCallback, out SafeCmNotificationHandle pNotifyContext); 14 | 15 | [DllImport("cfgmgr32.dll", CharSet = CharSet.Unicode)] 16 | public static extern CR CM_Unregister_Notification(IntPtr NotifyContext); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Display/DisplayInfo.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Native.Windows.Display; 2 | 3 | namespace OpenTabletDriver.Native.Windows 4 | { 5 | public class DisplayInfo 6 | { 7 | public DisplayInfo(Rect monitorArea, uint flags) 8 | { 9 | MonitorArea = monitorArea; 10 | IsPrimary = ((MONITORINFOF)flags).HasFlag(MONITORINFOF.PRIMARY); 11 | } 12 | 13 | public Rect MonitorArea { private set; get; } 14 | 15 | public int Width => MonitorArea.right - MonitorArea.left; 16 | public int Height => MonitorArea.bottom - MonitorArea.top; 17 | public int Top => MonitorArea.top; 18 | public int Left => MonitorArea.left; 19 | public int Bottom => MonitorArea.bottom; 20 | public int Right => MonitorArea.right; 21 | public bool IsPrimary { private set; get; } 22 | 23 | public override string ToString() 24 | { 25 | return string.Format("{0}x{1}@{2},{3}", Width, Height, Left, Top); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Display/DpiType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows 2 | { 3 | public enum DpiType 4 | { 5 | Effective, 6 | Angular, 7 | Raw 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Display/MONITORINFOF.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.Display 2 | { 3 | public enum MONITORINFOF : ulong 4 | { 5 | PRIMARY = 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Display/MonitorInfoEx.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct MonitorInfoEx 7 | { 8 | public uint size; 9 | public Rect monitor; 10 | public Rect work; 11 | public uint flags; 12 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] 13 | public string deviceName; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Generic/POINT.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct POINT 7 | { 8 | public int X; 9 | public int Y; 10 | 11 | public POINT(int x, int y) 12 | { 13 | this.X = x; 14 | this.Y = y; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Generic/Rect.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct Rect 7 | { 8 | public int left; 9 | public int top; 10 | public int right; 11 | public int bottom; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Generic/SafeFileHandle.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32.SafeHandles; 2 | 3 | namespace OpenTabletDriver.Native.Windows 4 | { 5 | public class SafeFileHandle : SafeHandleZeroOrMinusOneIsInvalid 6 | { 7 | public SafeFileHandle() 8 | : base(true) 9 | { 10 | } 11 | 12 | protected override bool ReleaseHandle() 13 | { 14 | return Windows.CloseHandle(handle); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/HARDWAREINPUT.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.Input 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct HARDWAREINPUT 7 | { 8 | public int uMsg; 9 | public short wParamL; 10 | public short wParamH; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/INPUT.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.Input 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct INPUT 7 | { 8 | public INPUT_TYPE type; 9 | public InputUnion U; 10 | public static int Size => Marshal.SizeOf(typeof(INPUT)); 11 | } 12 | 13 | public enum INPUT_TYPE 14 | { 15 | MOUSE_INPUT, 16 | KEYBD_INPUT, 17 | HARDWARE_INPUT 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/InputUnion.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.Input 4 | { 5 | [StructLayout(LayoutKind.Explicit)] 6 | public struct InputUnion 7 | { 8 | [FieldOffset(0)] 9 | public MOUSEINPUT mi; 10 | [FieldOffset(0)] 11 | public KEYBDINPUT ki; 12 | [FieldOffset(0)] 13 | public HARDWAREINPUT hi; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/KEYBDINPUT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Windows.Input 5 | { 6 | using Int16 = Int16; 7 | using ScanCodeShort = Int16; 8 | using UInt32 = UInt32; 9 | using VirtualKeyShort = Int16; 10 | 11 | [StructLayout(LayoutKind.Sequential)] 12 | public struct KEYBDINPUT 13 | { 14 | public VirtualKeyShort wVk; 15 | public ScanCodeShort wScan; 16 | public KEYEVENTF dwFlags; 17 | public int time; 18 | public UIntPtr dwExtraInfo; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/KEYEVENTF.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.Input 2 | { 3 | public enum KEYEVENTF : short 4 | { 5 | KEYDOWN = 0x0000, 6 | EXTENDEDKEY = 0x0001, 7 | KEYUP = 0X0002, 8 | UNICODE = 0x0004, 9 | SCANCODE = 0x0008 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/KEYSTATE.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.Input 2 | { 3 | public enum KEYSTATE : int 4 | { 5 | KEY_TOGGLED = 0x1, 6 | KEY_PRESSED = 0x8000 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/MOUSEEVENTF.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.Input 2 | { 3 | public enum MOUSEEVENTF : uint 4 | { 5 | ABSOLUTE = 0x8000, 6 | MOVE = 0x0001, 7 | VIRTUALDESK = 0x4000, 8 | LEFTDOWN = 0x0002, 9 | LEFTUP = 0x0004, 10 | MIDDLEDOWN = 0x0020, 11 | MIDDLEUP = 0x0040, 12 | RIGHTDOWN = 0x0008, 13 | RIGHTUP = 0x0010, 14 | XDOWN = 0x0080, 15 | XUP = 0x0100, 16 | MOVE_NOCOALESCE = 0x2000 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/MOUSEINPUT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Windows.Input 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | public struct MOUSEINPUT 8 | { 9 | public int dx; 10 | public int dy; 11 | public uint mouseData; 12 | public MOUSEEVENTF dwFlags; 13 | public uint time; 14 | public UIntPtr dwExtraInfo; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/VirtualKeyStates.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.Input 2 | { 3 | public enum VirtualKeyStates : int 4 | { 5 | VK_LBUTTON = 0x01, 6 | VK_RBUTTON = 0x02, 7 | VK_MBUTTON = 0x04, 8 | VK_XBUTTON1 = 0x05, 9 | VK_XBUTTON2 = 0x06, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Input/XBUTTON.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows 2 | { 3 | public enum XBUTTON : uint 4 | { 5 | NONE = 0x0000, 6 | XBUTTON1 = 0x0001, 7 | XBUTTON2 = 0x0002 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/SetupApiStructs/SP_DEVICE_INTERFACE_DATA.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Windows.SetupApiStructs 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | public struct SP_DEVICE_INTERFACE_DATA 8 | { 9 | public int cbSize; 10 | public Guid interfaceClassGuid; 11 | public int flags; 12 | private readonly UIntPtr reserved; 13 | 14 | public static SP_DEVICE_INTERFACE_DATA Create() 15 | { 16 | return new SP_DEVICE_INTERFACE_DATA { cbSize = Marshal.SizeOf(typeof(SP_DEVICE_INTERFACE_DATA)) }; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/SetupApiStructs/SP_DEVICE_INTERFACE_DETAIL_DATA.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace OpenTabletDriver.Native.Windows.SetupApiStructs 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] 7 | public struct SP_DEVICE_INTERFACE_DETAIL_DATA 8 | { 9 | public int cbSize; 10 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 11 | public string DevicePath; 12 | 13 | public static SP_DEVICE_INTERFACE_DETAIL_DATA Create() 14 | { 15 | return new SP_DEVICE_INTERFACE_DETAIL_DATA { cbSize = IntPtr.Size == 8 ? 8 : 6 }; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Timers/EventType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Native.Windows.Timers 4 | { 5 | [Flags] 6 | public enum EventType : uint 7 | { 8 | TIME_ONESHOT = 0, // Event occurs once, after uDelay milliseconds. 9 | TIME_PERIODIC = 1, // Event occurs every after uDelay milliseconds. 10 | TIME_KILL_SYNCHRONOUS = 0x100 // Immediately stop timer when requested. 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/Timers/TimeCaps.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.Timers 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct TimeCaps 7 | { 8 | public uint wPeriodMin; 9 | public uint wPeriodMax; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/DIGCF.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Native.Windows.USB 4 | { 5 | [Flags] 6 | public enum DIGCF 7 | { 8 | None = 0, 9 | Default = 1, 10 | Present = 2, 11 | AllClasses = 4, 12 | Profile = 8, 13 | DeviceInterface = 16 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/DescriptorHeader.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.USB 4 | { 5 | [StructLayout(LayoutKind.Sequential, Pack = 1)] 6 | public readonly struct DescriptorHeader 7 | { 8 | public readonly byte bLength; 9 | public readonly DescriptorType bDescriptorType; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/DescriptorType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum DescriptorType : byte 4 | { 5 | Undefined, 6 | Device, 7 | Configuration, 8 | StringDescriptor, 9 | Interface, 10 | Endpoint, 11 | InterfacePower = 0x08, 12 | OTG, 13 | Debug, 14 | InterfaceAssociation, 15 | BOS = 0x15, 16 | DeviceCapability, 17 | HID = 0x21, 18 | Report, 19 | Physical, 20 | SuperSpeedUSBEndpointCompanion = 0x48, 21 | SuperSpeedPlusIsochronousEndpointCompanion, 22 | } 23 | 24 | public static class DescriptorTypeExtensions 25 | { 26 | public static ushort WithIndex(this DescriptorType descriptorType, int index) => 27 | (ushort)(((ushort)descriptorType << 8) | index); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/DeviceDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.USB 4 | { 5 | [StructLayout(LayoutKind.Sequential, Pack = 1)] 6 | public readonly struct DeviceDescriptor 7 | { 8 | public readonly DescriptorHeader Header; 9 | 10 | public readonly ushort bcdUSB; 11 | 12 | public readonly byte bDeviceClass; 13 | 14 | public readonly byte bDeviceSubClass; 15 | 16 | public readonly byte bDeviceProtocol; 17 | 18 | public readonly byte bMaxPacketSize0; 19 | 20 | public readonly ushort idVendor; 21 | 22 | public readonly ushort idProduct; 23 | 24 | public readonly ushort bcdDevice; 25 | 26 | public readonly byte iManufacturer; 27 | 28 | public readonly byte iProduct; 29 | 30 | public readonly byte iSerialNumber; 31 | 32 | public readonly byte bNumConfigurations; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/InterfaceDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.USB 4 | { 5 | [StructLayout(LayoutKind.Sequential, Pack = 1)] 6 | public readonly struct InterfaceDescriptor 7 | { 8 | public readonly DescriptorHeader Header; 9 | public readonly byte bInterfaceNumber; 10 | public readonly byte bAlternateSetting; 11 | public readonly byte bNumEndpoints; 12 | public readonly byte bInterfaceClass; 13 | public readonly byte bInterfaceSubClass; 14 | public readonly byte bInterfaceProtocol; 15 | public readonly byte iInterface; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/PipeDirection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum PipeDirection 4 | { 5 | Out, 6 | In 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/PipeInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace OpenTabletDriver.Native.Windows.USB 4 | { 5 | [StructLayout(LayoutKind.Sequential, Pack = 1)] 6 | public struct PipeInfo 7 | { 8 | public PipeType PipeType; 9 | public byte PipeID; 10 | private byte sizePacket0; 11 | private byte sizePacket1; 12 | public ushort MaximumPacketSize => (ushort)(sizePacket1 | (sizePacket0 << 8)); 13 | public byte Interval; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/PipeType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum PipeType : int 4 | { 5 | Control, 6 | Isochronous, 7 | Bulk, 8 | Interrupt 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/RequestDirection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum RequestDirection : byte 4 | { 5 | HostToDevice, 6 | DeviceToHost 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/RequestInternalType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum RequestInternalType : byte 4 | { 5 | Standard, 6 | Class, 7 | Vendor 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/RequestRecipient.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum RequestRecipient : byte 4 | { 5 | Device, 6 | Interface, 7 | Endpoint, 8 | Other, 9 | VendorDefined = 0b0001_1111 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/SafeWinUsbInterfaceHandle.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32.SafeHandles; 2 | using static OpenTabletDriver.Native.Windows.WinUsb; 3 | 4 | namespace OpenTabletDriver.Native.Windows.USB 5 | { 6 | public class SafeWinUsbInterfaceHandle : SafeHandleZeroOrMinusOneIsInvalid 7 | { 8 | public SafeWinUsbInterfaceHandle() : base(true) 9 | { 10 | } 11 | 12 | protected override bool ReleaseHandle() 13 | { 14 | WinUsb_Free(handle); 15 | return true; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Native/Windows/USB/StandardRequestCode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Native.Windows.USB 2 | { 3 | public enum StandardRequestCode : byte 4 | { 5 | GetStatus, 6 | ClearFeature, 7 | SetFeature = 3, 8 | SetAddress = 5, 9 | GetDescriptor, 10 | SetDescriptor, 11 | GetConfiguration, 12 | SetConfiguration, 13 | GetInterface, 14 | SetInterface, 15 | SynchFrame, 16 | SetEncryption, 17 | GetEncryption, 18 | SetHandshake, 19 | GetHandshake, 20 | SetConnection, 21 | SetSecurityData, 22 | GetSecurityData, 23 | SetWUsbData, 24 | LoopbackDataWrite, 25 | LoopbackDataRead, 26 | SetInterfaceDs, 27 | SetSel = 48, 28 | SetIsochDelay 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/ActionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Marks a static function to be executed from the client application. 7 | /// 8 | [AttributeUsage(AttributeTargets.Method)] 9 | public class ActionAttribute : Attribute 10 | { 11 | public ActionAttribute(string groupName, string displayText) 12 | { 13 | GroupName = groupName; 14 | DisplayText = displayText; 15 | } 16 | 17 | public string GroupName { set; get; } 18 | public string DisplayText { set; get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/BooleanPropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Marks a property to be modified as a boolean. 7 | /// 8 | [AttributeUsage(AttributeTargets.Property)] 9 | public class BooleanPropertyAttribute : PropertyAttribute 10 | { 11 | public BooleanPropertyAttribute(string displayName, string description) : base(displayName) 12 | { 13 | Description = description; 14 | } 15 | 16 | public string Description { set; get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/BuildDateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Assembly)] 6 | public class BuildDateAttribute : Attribute 7 | { 8 | public string BuildDate { get; } 9 | public BuildDateAttribute(string buildDate) 10 | { 11 | BuildDate = buildDate; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/DefaultPropertyValueAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Applies the default value to a property. 7 | /// 8 | [AttributeUsage(AttributeTargets.Property)] 9 | public class DefaultPropertyValueAttribute : Attribute 10 | { 11 | public DefaultPropertyValueAttribute(object value) 12 | { 13 | this.Value = value; 14 | } 15 | 16 | public object Value { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/DeviceHubAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Class)] 6 | public class DeviceHubAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/ModifierAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Base attribute class for attributes which provide extra information to a property. 7 | /// 8 | public abstract class ModifierAttribute : Attribute 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/PluginIgnoreAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Marks a plugin class to be ignored in reflection calls. 7 | /// 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] 9 | public class PluginIgnoreAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/PluginNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Applies a friendly name of a plugin class. 7 | /// 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] 9 | public class PluginNameAttribute : Attribute 10 | { 11 | public PluginNameAttribute(string name) 12 | { 13 | Name = name; 14 | } 15 | 16 | public readonly string Name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/PropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Marks a property to be modified and saved by a client to settings. 7 | /// 8 | [AttributeUsage(AttributeTargets.Property)] 9 | public class PropertyAttribute : Attribute 10 | { 11 | public PropertyAttribute(string displayName) 12 | { 13 | DisplayName = displayName; 14 | } 15 | 16 | public string DisplayName { set; get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/SliderPropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Creates a slider for a property value between and . 7 | /// 8 | [AttributeUsage(AttributeTargets.Property)] 9 | public class SliderPropertyAttribute : PropertyAttribute 10 | { 11 | public SliderPropertyAttribute(string displayName, float min, float max, float defaultValue = 0f) : base(displayName) 12 | { 13 | Min = min; 14 | Max = max; 15 | DefaultValue = defaultValue; 16 | } 17 | 18 | public float Min { set; get; } 19 | public float Max { set; get; } 20 | public float DefaultValue { set; get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/TabletReferenceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] 6 | public class TabletReferenceAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/ToolTipAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Attributes 4 | { 5 | /// 6 | /// Applies a tooltip to a property on the client. 7 | /// 8 | public class ToolTipAttribute : ModifierAttribute 9 | { 10 | public ToolTipAttribute(string tooltip) 11 | { 12 | this.ToolTip = tooltip; 13 | } 14 | 15 | public string ToolTip { private set; get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Attributes/UnitAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Attributes 2 | { 3 | /// 4 | /// Applies a unit suffix to a property on the client. 5 | /// 6 | public class UnitAttribute : ModifierAttribute 7 | { 8 | public UnitAttribute(string unit) 9 | { 10 | this.Unit = unit; 11 | } 12 | 13 | public string Unit { set; get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Components/ICompositeDeviceHub.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using OpenTabletDriver.Plugin.Devices; 3 | 4 | namespace OpenTabletDriver.Plugin.Components 5 | { 6 | public interface ICompositeDeviceHub : IDeviceHub 7 | { 8 | IEnumerable DeviceHubs { get; } 9 | void ConnectDeviceHub() where T : IDeviceHub; 10 | void ConnectDeviceHub(IDeviceHub instance); 11 | void DisconnectDeviceHub() where T : IDeviceHub; 12 | void DisconnectDeviceHub(IDeviceHub instance); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Components/IDeviceConfigurationProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using OpenTabletDriver.Plugin.Tablet; 3 | 4 | namespace OpenTabletDriver.Plugin.Components 5 | { 6 | public interface IDeviceConfigurationProvider 7 | { 8 | IEnumerable TabletConfigurations { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Components/IDeviceHubsProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using OpenTabletDriver.Plugin.Devices; 3 | 4 | namespace OpenTabletDriver.Plugin.Components 5 | { 6 | public interface IDeviceHubsProvider 7 | { 8 | IEnumerable DeviceHubs { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Components/IReportParserProvider.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Plugin.Components 4 | { 5 | public interface IReportParserProvider 6 | { 7 | IReportParser GetReportParser(string reportParserName); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/DependencyInjection/OnDependencyLoadAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.DependencyInjection 4 | { 5 | /// 6 | /// Marks a method to fire when all dependencies have been injected successfully. 7 | /// 8 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 9 | public class OnDependencyLoadAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/DependencyInjection/ResolvedAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.DependencyInjection 4 | { 5 | /// 6 | /// Marks a property or field to be resolved with dependency injection. 7 | /// It's value will be set as soon as the object is constructed. 8 | /// 9 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = false, AllowMultiple = false)] 10 | public class ResolvedAttribute : Attribute 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Devices/IDeviceEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace OpenTabletDriver.Plugin.Devices 5 | { 6 | public interface IDeviceEndpoint 7 | { 8 | int ProductID { get; } 9 | int VendorID { get; } 10 | int InputReportLength { get; } 11 | int OutputReportLength { get; } 12 | int FeatureReportLength { get; } 13 | 14 | string Manufacturer { get; } 15 | string ProductName { get; } 16 | string FriendlyName { get; } 17 | string SerialNumber { get; } 18 | 19 | string DevicePath { get; } 20 | bool CanOpen { get; } 21 | 22 | IDeviceEndpointStream Open(); 23 | 24 | string GetDeviceString(byte index); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Devices/IDeviceEndpointStream.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Devices 4 | { 5 | public interface IDeviceEndpointStream : IDisposable 6 | { 7 | byte[] Read(); 8 | void Write(byte[] buffer); 9 | 10 | void GetFeature(byte[] buffer); 11 | void SetFeature(byte[] buffer); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Devices/IDeviceHub.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OpenTabletDriver.Plugin.Devices 5 | { 6 | public interface IDeviceHub 7 | { 8 | event EventHandler DevicesChanged; 9 | 10 | IEnumerable GetDevices(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/IBinding.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Plugin 4 | { 5 | public interface IBinding 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/IStateBinding.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Plugin 4 | { 5 | public interface IStateBinding : IBinding 6 | { 7 | /// 8 | /// The method to perform when the binding is being activated. 9 | /// 10 | /// The tablet that this report is from. 11 | /// The report that triggered the press. 12 | void Press(TabletReference tablet, IDeviceReport report); 13 | 14 | /// 15 | /// Invoked when the binding is being released. 16 | /// 17 | /// The tablet that this report is from. 18 | /// The report that triggered the release. 19 | void Release(TabletReference tablet, IDeviceReport report); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/ITimer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Timers 4 | { 5 | public interface ITimer : IDisposable 6 | { 7 | void Start(); 8 | void Stop(); 9 | bool Enabled { get; } 10 | float Interval { get; set; } 11 | event Action Elapsed; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/ITool.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin 4 | { 5 | /// 6 | /// A plugin that will be started up and kept running until OpenTabletDriver is closed. 7 | /// 8 | public interface ITool : IDisposable 9 | { 10 | bool Initialize(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/LogLevel.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin 2 | { 3 | /// 4 | /// Various severity levels for s. 5 | /// 6 | public enum LogLevel 7 | { 8 | Debug, 9 | Info, 10 | Warning, 11 | Error, 12 | Fatal 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0;$(FrameworkBase) 5 | 6 | 7 | 8 | $([System.DateTime]::UtcNow.ToString("d")) 9 | 10 | 11 | 12 | 13 | <_Parameter1>$(BuildDate) 14 | 15 | 16 | 17 | 18 | OpenTabletDriver.Plugin 19 | Library used to create OpenTabletDriver plugins. 20 | ../nupkg 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Output/IPipelineElement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Output 4 | { 5 | public interface IPipelineElement 6 | { 7 | /// 8 | /// Handles an object to be processed by the . 9 | /// 10 | void Consume(T value); 11 | 12 | /// 13 | /// Invoked when an object of is to be pushed to the next link in the pipeline. 14 | /// 15 | event Action Emit; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Output/IPointerProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Output 2 | { 3 | public interface IPointerProvider where T : class 4 | { 5 | T Pointer { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Output/IPositionedPipelineElement.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Output 2 | { 3 | public interface IPositionedPipelineElement : IPipelineElement 4 | { 5 | /// 6 | /// The position in which this will be processed. 7 | /// This helps determine what the expected input units will be. 8 | /// 9 | PipelinePosition Position { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Output/PipelinePosition.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Output 2 | { 3 | public enum PipelinePosition 4 | { 5 | None = 0, 6 | PreTransform = 1 << 0, 7 | PostTransform = 1 << 1, 8 | Raw = PreTransform, 9 | Pixels = PostTransform 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Display/IDisplay.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Platform.Display 4 | { 5 | public interface IDisplay 6 | { 7 | int Index { get; } 8 | float Width { get; } 9 | float Height { get; } 10 | Vector2 Position { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Display/IVirtualScreen.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTabletDriver.Plugin.Platform.Display 4 | { 5 | public interface IVirtualScreen : IDisplay 6 | { 7 | IEnumerable Displays { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Keyboard/IVirtualKeyboard.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTabletDriver.Plugin.Platform.Keyboard 4 | { 5 | public interface IVirtualKeyboard 6 | { 7 | void Press(string key); 8 | void Release(string key); 9 | 10 | void Press(IEnumerable keys); 11 | void Release(IEnumerable keys); 12 | 13 | IEnumerable SupportedKeys { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IAbsolutePointer.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Platform.Pointer 4 | { 5 | public interface IAbsolutePointer 6 | { 7 | void SetPosition(Vector2 pos); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IEraserHandler.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public interface IEraserHandler 4 | { 5 | void SetEraser(bool isEraser); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IHoverDistanceHandler.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public interface IHoverDistanceHandler 4 | { 5 | void SetHoverDistance(uint distance); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IMouseButtonHandler.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public interface IMouseButtonHandler 4 | { 5 | void MouseDown(MouseButton button); 6 | void MouseUp(MouseButton button); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IPressureHandler.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public interface IPressureHandler 4 | { 5 | void SetPressure(float percentage); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IProximityHandler.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public interface IProximityHandler 4 | { 5 | void SetProximity(bool proximity); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/IRelativePointer.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Platform.Pointer 4 | { 5 | public interface IRelativePointer 6 | { 7 | void SetPosition(Vector2 delta); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/ISynchronousPointer.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public interface ISynchronousPointer 4 | { 5 | void Reset(); 6 | void Flush(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/ITiltHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Platform.Pointer 4 | { 5 | public interface ITiltHandler 6 | { 7 | void SetTilt(Vector2 tilt); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Platform/Pointer/MouseButton.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Platform.Pointer 2 | { 3 | public enum MouseButton 4 | { 5 | None = 0, 6 | Left = 1, 7 | Middle = 2, 8 | Right = 3, 9 | Backward = 4, 10 | Forward = 5 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/PluginPlatform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin 4 | { 5 | [Flags] 6 | public enum PluginPlatform 7 | { 8 | Unknown = 0, 9 | Windows = 1 << 0, 10 | Linux = 1 << 1, 11 | MacOS = 1 << 2, 12 | FreeBSD = 1 << 3, 13 | Android = 1 << 4, 14 | iOS = 1 << 5 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/AuxReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public struct AuxReport : IAuxReport 4 | { 5 | public AuxReport(byte[] report) 6 | { 7 | Raw = report; 8 | 9 | var auxByte = report[3]; 10 | AuxButtons = new bool[] 11 | { 12 | auxByte.IsBitSet(0), 13 | auxByte.IsBitSet(1), 14 | auxByte.IsBitSet(2), 15 | auxByte.IsBitSet(3) 16 | }; 17 | } 18 | 19 | public byte[] Raw { set; get; } 20 | public bool[] AuxButtons { set; get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/AuxReportParser.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class AuxReportParser : IReportParser 4 | { 5 | public IDeviceReport Parse(byte[] data) 6 | { 7 | return new AuxReport(data); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/ButtonSpecifications.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class ButtonSpecifications 4 | { 5 | /// 6 | /// The amount of buttons. 7 | /// 8 | public uint ButtonCount { set; get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/ByteExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public static class ByteExtensions 4 | { 5 | public static bool IsBitSet(this byte a, int bit) 6 | { 7 | return (a & (1 << bit)) != 0; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/DeviceReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public struct DeviceReport : IDeviceReport 4 | { 5 | public DeviceReport(byte[] report) 6 | { 7 | Raw = report; 8 | } 9 | 10 | public byte[] Raw { set; get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/DeviceVendor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | [Flags] 6 | public enum DeviceVendor 7 | { 8 | Wacom = 0x056A, 9 | Huion = 0x256C, 10 | Gaomon = 0x256C, 11 | XP_Pen = 0x28BD, 12 | VEIKK = 0x2FEB, 13 | UC_Logic = 0x5543 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/DigitizerSpecifications.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class DigitizerSpecifications 4 | { 5 | /// 6 | /// The width of the digitizer in millimeters. 7 | /// 8 | public float Width { set; get; } 9 | 10 | /// 11 | /// The height of the digitizer in millimeters. 12 | /// 13 | public float Height { set; get; } 14 | 15 | /// 16 | /// The maximum X coordinate for the digitizer. 17 | /// 18 | public float MaxX { set; get; } 19 | 20 | /// 21 | /// The maximum Y coordinate for the digitizer. 22 | /// 23 | public float MaxY { set; get; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IAbsolutePositionReport.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | public interface IAbsolutePositionReport : IDeviceReport 6 | { 7 | Vector2 Position { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IAreaConverter.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public interface IAreaConverter 4 | { 5 | DeviceVendor Vendor { get; } 6 | 7 | string Top { get; } 8 | string Left { get; } 9 | string Bottom { get; } 10 | string Right { get; } 11 | 12 | Area Convert(TabletReference tablet, double top, double left, double bottom, double right); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IAuxReport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | public interface IAuxReport : IDeviceReport 6 | { 7 | bool[] AuxButtons { set; get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IDeviceReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public interface IDeviceReport 4 | { 5 | byte[] Raw { set; get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IEraserReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public interface IEraserReport : IDeviceReport 4 | { 5 | bool Eraser { set; get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IMouseReport.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | public interface IMouseReport : IAbsolutePositionReport 6 | { 7 | bool[] MouseButtons { set; get; } 8 | Vector2 Scroll { set; get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IProximityReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public interface IProximityReport : IDeviceReport 4 | { 5 | bool NearProximity { set; get; } 6 | uint HoverDistance { set; get; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IReportParser.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public interface IReportParser where T : IDeviceReport 4 | { 5 | T Parse(byte[] report); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/ITabletReport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace OpenTabletDriver.Plugin.Tablet 5 | { 6 | public interface ITabletReport : IAbsolutePositionReport 7 | { 8 | uint Pressure { set; get; } 9 | bool[] PenButtons { set; get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/ITiltReport.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | public interface ITiltReport : IDeviceReport 6 | { 7 | Vector2 Tilt { set; get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/IToolReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public interface IToolReport : IDeviceReport 4 | { 5 | ulong Serial { set; get; } 6 | uint RawToolID { set; get; } 7 | ToolType Tool { set; get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/OutOfRangeReport.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | public struct OutOfRangeReport : IDeviceReport 6 | { 7 | public OutOfRangeReport(byte[] report) 8 | { 9 | Raw = report; 10 | } 11 | 12 | public byte[] Raw { set; get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/PassthroughReportParser.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class PassthroughReportParser : IReportParser 4 | { 5 | public virtual IDeviceReport Parse(byte[] data) 6 | { 7 | return new DeviceReport(data); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/PenSpecifications.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class PenSpecifications 4 | { 5 | /// 6 | /// The maximum pressure that the pen supports. 7 | /// 8 | public uint MaxPressure { set; get; } 9 | 10 | /// 11 | /// Specifications for the pen buttons. 12 | /// 13 | public ButtonSpecifications Buttons { set; get; } = new ButtonSpecifications(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/TabletReference.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet 4 | { 5 | public class TabletReference 6 | { 7 | public TabletReference() 8 | { 9 | } 10 | 11 | public TabletReference( 12 | TabletConfiguration properties, 13 | IEnumerable identifiers 14 | ) 15 | { 16 | this.Properties = properties; 17 | this.Identifiers = identifiers; 18 | } 19 | 20 | public TabletConfiguration Properties { set; get; } 21 | public IEnumerable Identifiers { set; get; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/TabletReport.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace OpenTabletDriver.Plugin.Tablet 5 | { 6 | public struct TabletReport : ITabletReport 7 | { 8 | public TabletReport(byte[] report) 9 | { 10 | Raw = report; 11 | 12 | Position = new Vector2 13 | { 14 | X = Unsafe.ReadUnaligned(ref report[2]), 15 | Y = Unsafe.ReadUnaligned(ref report[4]) 16 | }; 17 | Pressure = Unsafe.ReadUnaligned(ref report[6]); 18 | 19 | PenButtons = new bool[] 20 | { 21 | report[1].IsBitSet(1), 22 | report[1].IsBitSet(2) 23 | }; 24 | } 25 | 26 | public byte[] Raw { set; get; } 27 | public Vector2 Position { set; get; } 28 | public uint Pressure { set; get; } 29 | public bool[] PenButtons { set; get; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/TabletReportParser.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class TabletReportParser : IReportParser 4 | { 5 | public virtual IDeviceReport Parse(byte[] data) 6 | { 7 | return new TabletReport(data); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/TabletSpecifications.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class TabletSpecifications 4 | { 5 | /// 6 | /// Specifications for the tablet digitizer. 7 | /// 8 | public DigitizerSpecifications Digitizer { set; get; } 9 | 10 | /// 11 | /// Specifications for the tablet's pen. 12 | /// 13 | public PenSpecifications Pen { set; get; } 14 | 15 | /// 16 | /// Specifications for the auxiliary buttons. 17 | /// 18 | public ButtonSpecifications AuxiliaryButtons { set; get; } 19 | 20 | /// 21 | /// Specifications for the mouse buttons. 22 | /// 23 | public ButtonSpecifications MouseButtons { set; get; } 24 | 25 | /// 26 | /// Specifications for the touch digitizer. 27 | /// 28 | public DigitizerSpecifications Touch { set; get; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/TiltTabletReportParser.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public class TiltTabletReportParser : IReportParser 4 | { 5 | public virtual IDeviceReport Parse(byte[] data) 6 | { 7 | return new TiltTabletReport(data); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/ToolType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet 2 | { 3 | public enum ToolType 4 | { 5 | Pen, 6 | Eraser 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/Touch/ITouchReport.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Plugin.Tablet.Touch 2 | { 3 | public interface ITouchReport : IDeviceReport 4 | { 5 | TouchPoint[] Touches { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Plugin/Tablet/Touch/TouchPoint.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace OpenTabletDriver.Plugin.Tablet.Touch 4 | { 5 | public class TouchPoint 6 | { 7 | public byte TouchID; 8 | public Vector2 Position; 9 | 10 | public override string ToString() 11 | { 12 | return $"Point #{TouchID}: {Position};"; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.Tests/DetectionRangeTest.cs: -------------------------------------------------------------------------------- 1 | using OpenTabletDriver.Plugin.Tablet; 2 | using Xunit; 3 | 4 | namespace OpenTabletDriver.Tests 5 | { 6 | public class DetectionRangeTest 7 | { 8 | [Theory] 9 | [InlineData("[0..16)", 16, false)] 10 | [InlineData("[0..16)", 0, true)] 11 | [InlineData("(0..16]", 16, true)] 12 | [InlineData("(0..16]", 0, false)] 13 | public void RangeTest(string rangeStr, int testValue, bool expectedResult) 14 | { 15 | var range = DetectionRange.Parse(rangeStr); 16 | 17 | var result = range.IsInRange(testValue); 18 | 19 | Assert.Equal(expectedResult, result); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenTabletDriver.Tools.udev/Comparers/IdentifierComparer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Diagnostics.CodeAnalysis; 3 | using OpenTabletDriver.Plugin.Tablet; 4 | 5 | namespace OpenTabletDriver.Tools.udev.Comparers 6 | { 7 | public class IdentifierComparer : IEqualityComparer 8 | { 9 | public bool Equals([AllowNull] DeviceIdentifier x, [AllowNull] DeviceIdentifier y) 10 | { 11 | return x.VendorID == y.VendorID && x.ProductID == y.ProductID; 12 | } 13 | 14 | public int GetHashCode([DisallowNull] DeviceIdentifier obj) 15 | { 16 | return (obj.VendorID ^ obj.ProductID).GetHashCode(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenTabletDriver.Tools.udev/Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.Tools.udev 2 | { 3 | internal static class Extensions 4 | { 5 | public static string ToHexFormat(this int value) => value.ToString("x2").PadLeft(4, '0'); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.Tools.udev/OpenTabletDriver.Tools.udev.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(FrameworkBase) 6 | 7 | 8 | 9 | true 10 | otd-udev 11 | ./nupkg 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX.Gtk/OpenTabletDriver.UX.Gtk.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | $(FrameworkBase) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX.Gtk/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Forms; 3 | using GLib; 4 | 5 | namespace OpenTabletDriver.UX.Gtk 6 | { 7 | class Program 8 | { 9 | [STAThread] 10 | public static void Main(string[] args) 11 | { 12 | App.Run(Eto.Platforms.Gtk, args); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX.MacOS/Icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfinityGhost/OpenTabletDriver/0ebebc6e5287f50e87bc058aeb12d91e357ae954/OpenTabletDriver.UX.MacOS/Icon.icns -------------------------------------------------------------------------------- /OpenTabletDriver.UX.MacOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | OpenTabletDriver 7 | CFBundleIdentifier 8 | com.infinityghost.opentabletdriver 9 | CFBundleShortVersionString 10 | 1.0 11 | LSMinimumSystemVersion 12 | 10.12 13 | CFBundleDevelopmentRegion 14 | en 15 | NSHumanReadableCopyright 16 | 17 | CFBundleIconFile 18 | Icon.icns 19 | 20 | 21 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX.MacOS/OpenTabletDriver.UX.MacOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(FrameworkBase) 6 | osx-x64 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX.MacOS/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.UX.MacOS 4 | { 5 | class Program 6 | { 7 | [STAThread] 8 | public static void Main(string[] args) 9 | { 10 | App.Run(Eto.Platforms.Mac64, args); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX.Wpf/OpenTabletDriver.UX.Wpf.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | $(FrameworkBase)-windows 6 | ../OpenTabletDriver.UX/Assets/otd.ico 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Assets/otd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfinityGhost/OpenTabletDriver/0ebebc6e5287f50e87bc058aeb12d91e357ae954/OpenTabletDriver.UX/Assets/otd.ico -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Assets/otd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfinityGhost/OpenTabletDriver/0ebebc6e5287f50e87bc058aeb12d91e357ae954/OpenTabletDriver.UX/Assets/otd.png -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Attributes/PageNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.UX.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Class)] 6 | public class PageNameAttribute : Attribute 7 | { 8 | public PageNameAttribute(string name) 9 | { 10 | this.Name = name; 11 | } 12 | 13 | public string Name { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/ChildDialog.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace OpenTabletDriver.UX 4 | { 5 | using static App; 6 | 7 | public abstract class ChildDialog : Dialog 8 | { 9 | protected ChildDialog(Window parentWindow) 10 | { 11 | Owner = parentWindow; 12 | Title = "OpenTabletDriver"; 13 | Icon = Logo.WithSize(Logo.Size); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Bindings/BindingDisplayList.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | using OpenTabletDriver.Desktop.Reflection; 3 | using OpenTabletDriver.UX.Controls.Generic; 4 | 5 | namespace OpenTabletDriver.UX.Controls.Bindings 6 | { 7 | public class BindingDisplayList : GeneratedItemList 8 | { 9 | public string Prefix { set; get; } 10 | 11 | protected virtual string GetTextForIndex(int index) 12 | { 13 | return $"{Prefix} {index + 1}"; 14 | } 15 | 16 | protected override Control CreateControl(int index, DirectBinding itemBinding) 17 | { 18 | BindingDisplay display = new BindingDisplay(); 19 | display.StoreBinding.Bind(itemBinding); 20 | 21 | return new Group 22 | { 23 | Text = GetTextForIndex(index), 24 | Orientation = Orientation.Horizontal, 25 | ExpandContent = false, 26 | Content = display 27 | }; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/DropDown.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace OpenTabletDriver.UX.Controls.Generic 4 | { 5 | public class DropDown : DropDown where T : class 6 | { 7 | public T SelectedItem 8 | { 9 | set => this.SelectedValue = value; 10 | get => this.SelectedValue as T; 11 | } 12 | 13 | public BindableBinding, T> SelectedItemBinding 14 | { 15 | get 16 | { 17 | return new BindableBinding, T>( 18 | this, 19 | c => c.SelectedValue as T, 20 | (c, v) => c.SelectedValue = v, 21 | (c, h) => c.SelectedValueChanged += h, 22 | (c, h) => c.SelectedValueChanged -= h 23 | ); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/InputBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Forms; 3 | 4 | namespace OpenTabletDriver.UX.Controls.Generic 5 | { 6 | public class InputBox : Group 7 | { 8 | public InputBox( 9 | string name, 10 | Func getValue, 11 | Action setValue, 12 | string placeholder = null, 13 | int textboxWidth = 300 14 | ) 15 | { 16 | this.Orientation = Orientation.Horizontal; 17 | this.ExpandContent = false; 18 | 19 | var textBox = new TextBox 20 | { 21 | Width = textboxWidth, 22 | PlaceholderText = placeholder 23 | }; 24 | textBox.TextBinding.Bind(getValue, setValue); 25 | 26 | base.Content = textBox; 27 | base.Text = name; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/ListBox.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Eto.Forms; 3 | 4 | namespace OpenTabletDriver.UX.Controls.Generic 5 | { 6 | public class ListBox : ListBox where T : class 7 | { 8 | public T SelectedItem 9 | { 10 | set => base.SelectedValue = value; 11 | get => (T)base.SelectedValue; 12 | } 13 | 14 | public IList Source 15 | { 16 | set => base.DataStore = value; 17 | get => (IList)base.DataStore; 18 | } 19 | 20 | public DirectBinding SelectedItemBinding => SelectedValueBinding.Cast(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/ModifiableConstructableItemList.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.UX.Controls.Generic 2 | { 3 | public abstract class ModifiableConstructableItemList : ModifiableItemList where T : new() 4 | { 5 | protected override void AddNew() => base.Add(ItemSource.Count, new T()); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/PaddingSpacerItem.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace OpenTabletDriver.UX.Controls.Generic 4 | { 5 | public class PaddingSpacerItem : StackLayoutItem 6 | { 7 | public PaddingSpacerItem() 8 | { 9 | this.Control = null; 10 | this.Expand = true; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Reflection/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using OpenTabletDriver.Plugin.Attributes; 3 | 4 | namespace OpenTabletDriver.UX.Controls.Generic.Reflection 5 | { 6 | public static class Extensions 7 | { 8 | public static string GetFriendlyName(this TypeInfo type) 9 | { 10 | return type.GetCustomAttribute()?.Name ?? type.FullName; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/StylizedText.cs: -------------------------------------------------------------------------------- 1 | using Eto.Drawing; 2 | using Eto.Forms; 3 | 4 | namespace OpenTabletDriver.UX.Controls.Generic 5 | { 6 | public class StylizedText : Panel 7 | { 8 | public StylizedText() 9 | : base() 10 | { 11 | Content = new Label(); 12 | } 13 | 14 | public StylizedText(string text, Font font) 15 | : this() 16 | { 17 | Text = text; 18 | Font = font; 19 | } 20 | 21 | public StylizedText(string text, Font font, Padding padding) 22 | : this(text, font) 23 | { 24 | Padding = padding; 25 | } 26 | 27 | public string Text 28 | { 29 | get => ((Label)Content).Text; 30 | set => ((Label)Content).Text = value; 31 | } 32 | 33 | public Font Font 34 | { 35 | get => ((Label)Content).Font; 36 | set => ((Label)Content).Font = value; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Text/DoubleNumberBox.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Eto.Forms; 3 | using OpenTabletDriver.UX.Controls.Generic.Text.Providers; 4 | 5 | namespace OpenTabletDriver.UX.Controls.Generic.Text 6 | { 7 | public class DoubleNumberBox : MaskedTextBox 8 | { 9 | public DoubleNumberBox() 10 | { 11 | Provider = new DoubleTextProvider(); 12 | } 13 | 14 | private class DoubleTextProvider : NumberTextProvider 15 | { 16 | public override double Value 17 | { 18 | set => Text = value.ToString(CultureInfo.InvariantCulture); 19 | get => double.TryParse(Text, NumberStyles.Any, CultureInfo.InvariantCulture, out var val) ? val : default(double); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Text/FloatNumberBox.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Eto.Forms; 3 | using OpenTabletDriver.UX.Controls.Generic.Text.Providers; 4 | 5 | namespace OpenTabletDriver.UX.Controls.Generic.Text 6 | { 7 | public class FloatNumberBox : MaskedTextBox 8 | { 9 | public FloatNumberBox() 10 | { 11 | Provider = new FloatTextProvider(); 12 | } 13 | 14 | private class FloatTextProvider : NumberTextProvider 15 | { 16 | public override float Value 17 | { 18 | set => Text = value.ToString(CultureInfo.InvariantCulture); 19 | get => float.TryParse(Text, NumberStyles.Any, CultureInfo.InvariantCulture, out var val) ? val : default(float); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Text/HexNumberBox.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using System.Text.RegularExpressions; 3 | using Eto.Forms; 4 | using OpenTabletDriver.UX.Controls.Generic.Text.Providers; 5 | 6 | namespace OpenTabletDriver.UX.Controls.Generic.Text 7 | { 8 | public class HexNumberBox : MaskedTextBox 9 | { 10 | public HexNumberBox() 11 | { 12 | Provider = new HexTextProvider(); 13 | } 14 | 15 | private class HexTextProvider : RegexTextProvider 16 | { 17 | protected override Regex Regex => new Regex(@"^(?:0x)?(?:[0-9A-F]{1,4})?$"); 18 | 19 | public override int Value 20 | { 21 | set => Text = "0x" + value.ToString("X4"); 22 | get => int.TryParse(Text.Replace("0x", string.Empty), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out var result) ? result : default(int); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Text/IntegerNumberBox.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Eto.Forms; 3 | using OpenTabletDriver.UX.Controls.Generic.Text.Providers; 4 | 5 | namespace OpenTabletDriver.UX.Controls.Generic.Text 6 | { 7 | public class IntegerNumberBox : MaskedTextBox 8 | { 9 | public IntegerNumberBox() 10 | { 11 | Provider = new IntegerTextProvider(); 12 | } 13 | 14 | private class IntegerTextProvider : NumberTextProvider 15 | { 16 | public override int Value 17 | { 18 | set => Text = value.ToString(CultureInfo.InvariantCulture); 19 | get => int.TryParse(Text, NumberStyles.Any, CultureInfo.InvariantCulture, out var val) ? val : default(int); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Text/Providers/RegexTextProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | 3 | namespace OpenTabletDriver.UX.Controls.Generic.Text.Providers 4 | { 5 | public abstract class RegexTextProvider : MaskedTextProvider 6 | { 7 | protected abstract Regex Regex { get; } 8 | 9 | protected override bool Allow(ref char character, ref int position) 10 | { 11 | builder.Insert(position, character); 12 | var builderResult = builder.ToString(); 13 | builder.Remove(position, 1); 14 | return Regex.IsMatch(builderResult); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Generic/Text/UnsignedIntegerNumberBox.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Eto.Forms; 3 | using OpenTabletDriver.UX.Controls.Generic.Text.Providers; 4 | 5 | namespace OpenTabletDriver.UX.Controls.Generic.Text 6 | { 7 | public class UnsignedIntegerNumberBox : MaskedTextBox 8 | { 9 | public UnsignedIntegerNumberBox() 10 | { 11 | Provider = new UnsignedIntegerTextProvider(); 12 | } 13 | 14 | private class UnsignedIntegerTextProvider : NumberTextProvider 15 | { 16 | public override uint Value 17 | { 18 | set => Text = value.ToString(CultureInfo.InvariantCulture); 19 | get => uint.TryParse(Text, NumberStyles.Any, CultureInfo.InvariantCulture, out var val) ? val : default(uint); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Utilities/ActionCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Forms; 3 | 4 | namespace OpenTabletDriver.UX.Controls.Utilities 5 | { 6 | public class ActionCommand : Command 7 | { 8 | public Action Action { set; get; } 9 | 10 | protected override void OnExecuted(EventArgs e) 11 | { 12 | base.OnExecuted(e); 13 | Action?.Invoke(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Controls/Utilities/BooleanCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Forms; 3 | 4 | namespace OpenTabletDriver.UX.Controls.Utilities 5 | { 6 | public class BooleanCommand : CheckCommand 7 | { 8 | public BooleanCommand() 9 | { 10 | CheckedBinding = new BindableBinding( 11 | this, 12 | (c) => c.Checked, 13 | (c, v) => c.Checked = v ?? false, 14 | (c, h) => c.CheckedChanged += h, 15 | (c, h) => c.CheckedChanged -= h 16 | ); 17 | } 18 | 19 | public BindableBinding CheckedBinding { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/IViewModelRoot.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace OpenTabletDriver.UX 4 | { 5 | public interface IViewModelRoot where T : INotifyPropertyChanged 6 | { 7 | T ViewModel { set; get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/OpenTabletDriver.UX.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(FrameworkBase) 5 | VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Tools/EnumTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace OpenTabletDriver.UX.Tools 5 | { 6 | public static class EnumTools 7 | { 8 | public static string GetName(this T value) where T : Enum 9 | { 10 | return Enum.GetName(typeof(T), value); 11 | } 12 | 13 | public static string[] GetNames() where T : Enum 14 | { 15 | return Enum.GetNames(typeof(T)); 16 | } 17 | 18 | public static T[] GetValues() where T : Enum 19 | { 20 | return Enum.GetValues(typeof(T)).OfType().ToArray(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Windows/Greeter/Pages/FAQPage.cs: -------------------------------------------------------------------------------- 1 | using Eto.Drawing; 2 | using OpenTabletDriver.UX.Attributes; 3 | using OpenTabletDriver.UX.Controls.Generic; 4 | 5 | namespace OpenTabletDriver.UX.Windows.Greeter.Pages 6 | { 7 | [PageName("Wiki")] 8 | public class WikiPage : StylizedPage 9 | { 10 | public WikiPage() 11 | { 12 | this.Content = new StackedContent 13 | { 14 | new PaddingSpacerItem(), 15 | new Bitmap(App.Logo.WithSize(150, 150)), 16 | new StylizedText("Wiki", SystemFonts.Bold(12), new Padding(0, 0, 0, 8)), 17 | "If you have any issues, check out the Wiki.", 18 | "This can be found under the Help menu in the main window.", 19 | new PaddingSpacerItem(), 20 | }; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Windows/Greeter/Pages/SystemTrayPage.cs: -------------------------------------------------------------------------------- 1 | using Eto.Drawing; 2 | using OpenTabletDriver.UX.Attributes; 3 | using OpenTabletDriver.UX.Controls.Generic; 4 | 5 | namespace OpenTabletDriver.UX.Windows.Greeter.Pages 6 | { 7 | [PageName("System Tray")] 8 | public class SystemTrayPage : StylizedPage 9 | { 10 | public SystemTrayPage() 11 | { 12 | this.Content = new StackedContent 13 | { 14 | new PaddingSpacerItem(), 15 | new Bitmap(App.Logo.WithSize(150, 150)), 16 | new StylizedText("System Tray", SystemFonts.Bold(12), new Padding(0, 0, 0, 8)), 17 | "When minimized, OpenTabletDriver will run in the background.", 18 | "The window can be restored from the system tray.", 19 | new PaddingSpacerItem(), 20 | }; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Windows/Greeter/Pages/WelcomePage.cs: -------------------------------------------------------------------------------- 1 | using Eto.Drawing; 2 | using OpenTabletDriver.UX.Attributes; 3 | using OpenTabletDriver.UX.Controls.Generic; 4 | 5 | namespace OpenTabletDriver.UX.Windows.Greeter.Pages 6 | { 7 | [PageName("Intro")] 8 | public class WelcomePage : StylizedPage 9 | { 10 | public WelcomePage() 11 | { 12 | this.Content = new StackedContent 13 | { 14 | new PaddingSpacerItem(), 15 | new Bitmap(App.Logo.WithSize(256, 256)), 16 | new StylizedText("OpenTabletDriver Guide", SystemFonts.Bold(12), new Padding(0, 0, 0, 10)), 17 | "Welcome to OpenTabletDriver!", 18 | "OpenTabletDriver is an open source, cross platform, user mode tablet driver.", 19 | new PaddingSpacerItem(), 20 | }; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Windows/StylizedPage.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Eto.Forms; 3 | using OpenTabletDriver.UX.Attributes; 4 | 5 | namespace OpenTabletDriver.UX.Windows 6 | { 7 | public class StylizedPage : DocumentPage 8 | { 9 | public StylizedPage() 10 | { 11 | this.Closable = false; 12 | 13 | var type = this.GetType(); 14 | this.Text = type.GetCustomAttribute()?.Name ?? type.Name; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenTabletDriver.UX/Windows/WindowSingleton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Forms; 3 | 4 | namespace OpenTabletDriver.UX.Windows 5 | { 6 | public class WindowSingleton where T : Window, new() 7 | { 8 | private T window; 9 | 10 | public void Show() 11 | { 12 | if (window == null) 13 | { 14 | window = new T(); 15 | window.Closed += HandleWindowClosed; 16 | } 17 | 18 | switch (window) 19 | { 20 | case DesktopForm desktopForm: 21 | desktopForm.Show(); 22 | break; 23 | case Form form: 24 | form.Show(); 25 | form.Focus(); 26 | break; 27 | case Dialog dialog: 28 | dialog.ShowModal(); 29 | break; 30 | } 31 | } 32 | 33 | private void HandleWindowClosed(object sender, EventArgs e) 34 | { 35 | window = null; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /OpenTabletDriver.Windows.slnf: -------------------------------------------------------------------------------- 1 | { 2 | "solution": { 3 | "path": ".\\OpenTabletDriver.sln", 4 | "projects": [ 5 | ".\\OpenTabletDriver\\OpenTabletDriver.csproj", 6 | ".\\OpenTabletDriver.Benchmarks\\OpenTabletDriver.Benchmarks.csproj", 7 | ".\\OpenTabletDriver.Configurations\\OpenTabletDriver.Configurations.csproj", 8 | ".\\OpenTabletDriver.Console\\OpenTabletDriver.Console.csproj", 9 | ".\\OpenTabletDriver.Daemon\\OpenTabletDriver.Daemon.csproj", 10 | ".\\OpenTabletDriver.Desktop\\OpenTabletDriver.Desktop.csproj", 11 | ".\\OpenTabletDriver.Native\\OpenTabletDriver.Native.csproj", 12 | ".\\OpenTabletDriver.Plugin\\OpenTabletDriver.Plugin.csproj", 13 | ".\\OpenTabletDriver.Tests\\OpenTabletDriver.Tests.csproj", 14 | ".\\OpenTabletDriver.UX\\OpenTabletDriver.UX.csproj", 15 | ".\\OpenTabletDriver.UX.Wpf\\OpenTabletDriver.UX.Wpf.csproj" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenTabletDriver/Devices/HidSharpBackend/HidSharpEndpointStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using HidSharp; 3 | using OpenTabletDriver.Plugin.Devices; 4 | 5 | namespace OpenTabletDriver.Devices.HidSharpBackend 6 | { 7 | public class HidSharpEndpointStream : IDeviceEndpointStream 8 | { 9 | internal HidSharpEndpointStream(HidStream stream) 10 | { 11 | this.stream = stream; 12 | stream.ReadTimeout = int.MaxValue; 13 | } 14 | 15 | private HidStream stream; 16 | 17 | public byte[] Read() => stream.Read(); 18 | public void Write(byte[] buffer) => stream.Write(buffer); 19 | 20 | public void GetFeature(byte[] buffer) => stream.GetFeature(buffer); 21 | public void SetFeature(byte[] buffer) => stream.SetFeature(buffer); 22 | 23 | public void Dispose() => stream.Dispose(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver/Devices/WinUSB/WindowsEnumerationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTabletDriver.Devices.WinUSB 4 | { 5 | public class WindowsEnumerationException : Exception 6 | { 7 | public WindowsEnumerationException(string msg) 8 | : base(msg) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OpenTabletDriver/DriverAlreadyBuiltException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | #nullable enable 4 | 5 | namespace OpenTabletDriver 6 | { 7 | public class DriverAlreadyBuiltException : Exception 8 | { 9 | public DriverAlreadyBuiltException() : this("A driver instance has already been built") 10 | { 11 | } 12 | 13 | public DriverAlreadyBuiltException(string? message) : base(message) 14 | { 15 | } 16 | 17 | public DriverAlreadyBuiltException(string? message, Exception? innerException) : base(message, innerException) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using OpenTabletDriver.Plugin; 3 | 4 | namespace OpenTabletDriver 5 | { 6 | internal static class Extensions 7 | { 8 | public static bool TryGet(this TSource source, Func predicate, out TValue value) 9 | { 10 | try 11 | { 12 | value = predicate(source); 13 | return true; 14 | } 15 | catch (Exception ex) 16 | { 17 | Log.Exception(ex); 18 | } 19 | value = default; 20 | return false; 21 | } 22 | 23 | public static TValue SafeGet(this TSource source, Func predicate, TValue fallback) => TryGet(source, predicate, out var value) ? value : fallback; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenTabletDriver/InputDeviceTreeList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace OpenTabletDriver 5 | { 6 | public class InputDeviceTreeList : Collection 7 | { 8 | protected override void ClearItems() 9 | { 10 | var outdatedDevices = new List(); 11 | foreach (var tree in base.Items) 12 | foreach (var dev in tree.InputDevices) 13 | outdatedDevices.Add(dev); 14 | 15 | foreach (var dev in outdatedDevices) 16 | dev.Dispose(); 17 | 18 | base.ClearItems(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver/Interop/SystemInterop.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using OpenTabletDriver.Plugin; 3 | 4 | namespace OpenTabletDriver.Interop 5 | { 6 | public class SystemInterop 7 | { 8 | protected SystemInterop() 9 | { 10 | } 11 | 12 | public static PluginPlatform CurrentPlatform 13 | { 14 | get 15 | { 16 | if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 17 | return PluginPlatform.Windows; 18 | else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 19 | return PluginPlatform.Linux; 20 | else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 21 | return PluginPlatform.MacOS; 22 | else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD)) 23 | return PluginPlatform.FreeBSD; 24 | else 25 | return 0; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OpenTabletDriver/SystemDrivers/IDriverInfoProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.SystemDrivers 2 | { 3 | internal interface IDriverInfoProvider 4 | { 5 | DriverInfo GetDriverInfo(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /OpenTabletDriver/SystemDrivers/Providers/GaomonDriverInfoProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.SystemDrivers.InfoProviders 2 | { 3 | internal class GaomonDriverInfoProvider : ProcessModuleQueryableDriverInfoProvider 4 | { 5 | protected override string FriendlyName => "Gaomon"; 6 | 7 | protected override string LinuxFriendlyName => "UC Logic"; 8 | 9 | protected override string LinuxModuleName => "hid_uclogic"; 10 | 11 | protected override string[] WinProcessNames { get; } = new string[] 12 | { 13 | "TabletDriverCore" 14 | }; 15 | 16 | protected override string[] Heuristics { get; } = new string[] 17 | { 18 | "Gaomon" 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver/SystemDrivers/Providers/HuionDriverInfoProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.SystemDrivers.InfoProviders 2 | { 3 | internal class HuionDriverInfoProvider : ProcessModuleQueryableDriverInfoProvider 4 | { 5 | protected override string FriendlyName => "Huion"; 6 | 7 | protected override string LinuxFriendlyName => "UC Logic"; 8 | 9 | protected override string LinuxModuleName => "hid_uclogic"; 10 | 11 | protected override string[] WinProcessNames { get; } = new string[] 12 | { 13 | "TabletDriverCore" 14 | }; 15 | 16 | protected override string[] Heuristics { get; } = new string[] 17 | { 18 | "Huion" 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenTabletDriver/SystemDrivers/Providers/OpenTabletDriverInfoProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.SystemDrivers.InfoProviders 2 | { 3 | public class OpenTabletDriverInfoProvider : IDriverInfoProvider 4 | { 5 | public DriverInfo GetDriverInfo() 6 | { 7 | var daemonInstanceName = "OpenTabletDriver.Daemon"; 8 | if (Instance.Exists(daemonInstanceName) && !Instance.IsOwnerOf(daemonInstanceName)) 9 | { 10 | return new DriverInfo 11 | { 12 | Name = "OpenTabletDriver", 13 | IsSendingInput = true 14 | }; 15 | } 16 | 17 | return null; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OpenTabletDriver/SystemDrivers/Providers/VeikkDriverInfoProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTabletDriver.SystemDrivers.InfoProviders 2 | { 3 | internal class VeikkDriverInfoDriver : ProcessModuleQueryableDriverInfoProvider 4 | { 5 | protected override string FriendlyName => "Veikk"; 6 | 7 | protected override string LinuxFriendlyName => "UC Logic"; 8 | 9 | protected override string LinuxModuleName => "hid_uclogic"; 10 | 11 | protected override string[] WinProcessNames { get; } = new string[] 12 | { 13 | "TabletDriverCenter", 14 | "TabletDriverSetting" 15 | }; 16 | 17 | protected override string[] Heuristics { get; } = new string[] 18 | { 19 | "Veikk" 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /generate-rules.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC_ROOT=$(readlink -f $(dirname ${BASH_SOURCE[0]})) 4 | [ ! -d "${SRC_ROOT}" ] && exit 100; 5 | 6 | PROJECT="${SRC_ROOT}/OpenTabletDriver.Tools.udev" 7 | FRAMEWORK="net6.0" 8 | 9 | TABLET_CONFIGURATIONS="${SRC_ROOT}/OpenTabletDriver.Configurations/Configurations" 10 | RULES_FILE="${SRC_ROOT}/bin/99-opentabletdriver.rules" 11 | 12 | if [ "$#" -gt 0 ]; then 13 | # Pass arguments to utility instead of using defaults 14 | dotnet_args=($@) 15 | else 16 | [ ! -d "${TABLET_CONFIGURATIONS}" ] && exit 101; 17 | dotnet_args=("-v" "${TABLET_CONFIGURATIONS}" "${RULES_FILE}") 18 | fi 19 | 20 | dotnet run -p "${PROJECT}" -f "${FRAMEWORK}" -- ${dotnet_args[@]} -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | --------------------------------------------------------------------------------