Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gesturesign does not detect wacom tablet touchpad #112

Open
natask opened this issue Feb 8, 2023 · 2 comments
Open

gesturesign does not detect wacom tablet touchpad #112

natask opened this issue Feb 8, 2023 · 2 comments

Comments

@natask
Copy link

natask commented Feb 8, 2023

I have a wacom pth450. It writing area can also be used a touchpad. however gesturesign doesn't detect the device. #55 seems similar.

@natask
Copy link
Author

natask commented Feb 9, 2023

I believe if I can register the wacom device as a touchpad within messagewindow.cs and initiated it as a touchpad, touchpad gestures will work the wacom device.
Also look at native

It looks like the way gesturesign works is WndProc feeds messages to the gesturesign and I expect windows passes to gesturesign messages only from devices gesturesign has registered to. Then gesturesign processes those messages to recognize gestures.

The game plan is to register the wacom device so that output messages it generates are sent to gesturesign. Then within Processinputcommand, treat the wacom device as a touchpad device.
Therefore I first need to find a usage flag that registers wacom device, and then treat devices with that usageflag as touchpads within ProcessInputCommand.

If the above analysis is correct I only need to modify /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Input/MessageWindow.cs

I will look at this when I can make time.

Points of interest in the codebase
Declare function of user32.dll registerRawInputDevices. /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Native/NativeMethods.cs:142
Register raw device according to usage flag (touchpad, touchscreen as defined in Daemon/Native?nativeMethods.cs) /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Input/MessageWindow.cs:132

What gesturesign expects from a touchpad. /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Input/TouchPadDevice.cs:14
Very important. Processinputcommand . I blieve this is where raw outputs of a device are processed /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Input/MessageWindow.cs:244
Very important. Where gesturesign decides to treat a device as a touchpad. /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Input/MessageWindow.cs:361
WndProc override /mnt/c/Users/natna/GestureSign/GestureSign.Daemon/Input/MessageWindow.cs:210

@natask
Copy link
Author

natask commented Feb 13, 2023

I have made some progress.
First to build the project, it is easiest with vs code 2019 with 5.2 5.0 6.0 6.1 and 6.2 .Net targeting packs and most importantly need to install windows sdk 10.0.1.14393.795.

Then, I found that enumerateDevices within daemon/input/hidDevice.cs very critical. it enumerates through all devices and sets .
I now need to find the product and vendor id of the wacom device, can according to this I can use HidD_GetProductString after opening a device as a file. there is also [https://github.com/DJm00n/RawInputDemo](this project) can also be used to list information about devices.

Then after finding the usageflag for the wacom device, or some other means of identifying it to pass to registerRawInputDevices, I will register the wacom device. Then I will have it be treated as a touchpad within the application.
I suspect it is being treated as a pen device. however It would be best treated as a touchpad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant