Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate stylus pen events and pressure in windows?

I made an external tablet application that is connected to a PC and you can write on it with a stylus pen and the tablet device send point and pressure information to PC and an aplication recives these information through usb connection, now we have point, event and pressure information, I want to know how can I generate and send stylus pen events and messages in windows by an application that created with C#?

I want to simulate mouse and pen events in Windows, I know how can I simulate mouse events by mouse_event function, but what about stylus pen events and its pressure? How can I simulate these events and messages I have to send to Windows?

Also I saw tablet PC API sample codes but they all about receiving pen events not sending pen events to windows, please help me or show me some reference about how to do that.

Thanks :)

like image 894
Behzad Gh Avatar asked Jan 20 '26 05:01

Behzad Gh


1 Answers

On a modern Windows operating system you can use input injection. Input injection provides support for programmatically generating and automating input from a variety of devices such as keyboard, mouse, touch, pen, and gamepad. Sample application and info is here https://learn.microsoft.com/en-us/windows/apps/design/input/input-injection

like image 137
Malcolm McCaffery Avatar answered Jan 21 '26 19:01

Malcolm McCaffery



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!