How to control a wacom pen in software?

Started by
5 comments, last by VanillaSnake21 8 years, 8 months ago

I would like to emulate a wacom pen in software in Windows 10. What I'm looking to do is have a program move the cursor and draw in photoshop, but I would like to use the wacom driver to do that. As in I want to send photoshop a message pen is touching screen at x,y with pressure p and tilt t without actually using the pen, everything should be done in software. I'm not sure how I can do that. I think windows 10 has a pen api and I will probably use that if I have no other choice but I was wondering if I can somehow use the wacom api or something similar.

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

Advertisement

I think it's a confusing post, what I want to do is have an app draw in photoshop. I can just do that by sending photoshop the wm_mousemove and wm_lbdown messages and it would draw, but I would like to incorporate pressure and tilt into the commands. Since I own a wacom tablet and I know photoshop works with it, so I was wondering if I can send the same messages that the wacom pen is sending photoshop. I've looked into the wacom api and it has a message wt_packet which seems to do just that I was just wondering if it's going to work or maybe there are other ways, I'm not even sure if photoshop is listening for that message. I could just use a message tracker and see what's being sent, but I just wanted to check here first.

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

Maybe you can replicate the interface for the DLL of the wacom driver and put it in the same directory as PhotoShop's executable (or in photoshop's plugin directory or whatever). You don't have to replicate the entire driver, just the DLL's interface, then you could have your proxy DLL forward the calls to the real driver (if desired), and also listen for events from some source you set up.

Just theorizing. I know things similar to that can be done, but I've never personally done it.

Wacom publishes APIs and sample code for integrating with them. Judging by the examples, it should be fairly straightforward to inject the requisite structs.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Wacom publishes APIs and sample code for integrating with them. Judging by the examples, it should be fairly straightforward to inject the requisite structs.

Yea I went through a few examples they had before making this thread, it does seem fairly straight forward, but I wasn't sure that PS even uses the wacom api. I mean it supports a whole range of tablets by various manufacturers so maybe they're using some windows API as a cover-all.

@Servant of the Lord, hmm, that probably would work, I'm going to look into it if using their native API won't work.

I kind of wanted the easiest method, hence why I'm even using photoshop in the first place. It's not too difficult to write a simple barebones drawing program, but I want this project to get done in a less then a week so looking to save time anywhere I can. Thanks for the suggestions never the less, I will try the wacom's api and see where it takes me.

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

But how would you incorporate tilt and pressure since in turn you have to control that app, and you only have mouse movement which leads me to the question on why to write an app that draws in photoshop through a Wacom interface instead of just simply using that tablet?

But how would you incorporate tilt and pressure since in turn you have to control that app, and you only have mouse movement which leads me to the question on why to write an app that draws in photoshop through a Wacom interface instead of just simply using that tablet?

well no I don't have to control the app, it's going to draw on it's own.

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

This topic is closed to new replies.

Advertisement