How can I access my trackpad in C #?

I'm really bored this weekend.

I decided to create an application for Morse code, where I can use my trackpad to use Morse code and show how its application sounds.

I told you that I'm bored !: D

Is there any defacto way to access the trackpad in C #? I mean the use of pressure graphs. Thanks!

+7
c # trackpad pressure
source share
2 answers

I am not 100% familiar with the idea of ​​a trackpad, but I assume that the machine you are working with is a laptop, and what you are talking about is what is otherwise known as a "mouse pad."

You can do a couple of things, at least in the windows. When you click with your finger, you are actually sending click events to the Windows runtime. If you hold

In .NET, any object (Forms / UserControls) that inherits from System.Windows.Forms.Control can subscribe to the following events:

  • Mousedown
  • Mouseup
  • Mouseenter
  • Mouseleave
  • Mouse click
  • Mousedoubleclick

You can separate the difference between MouseUp and MouseDown events and respond to the received time range ranges. For example, if you hold the mouse for 20 milliseconds, then this is the symbol of some Morse code, while holding the mouse for 40 milliseconds is some other symbol.

In the case of a mouse / trackpad, this will be equivalent to holding your finger on the pad itself.

+2
source share

Some tab drivers use additional information for mouse input, as well as additional information. I think WACOM does this to send a pen click.

This information can be requested using the GetMessageExtraInfo function.

You might want to check to see if there is anything interesting in your pad, but it is probably a specific provider, if something is even available, which is not certain.

+1
source share

All Articles