# Mworks support for Wacom tablets

**URL:** <https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477>\
**Category:** Support\
**Created:** [August 11, 2015, 9:36pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477 "2015-08-11T21:36:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 11, 2015, 9:36pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/1 "2015-08-11T21:36:17Z")

</div>

Hi Chris,  
I was wondering Mworks supports Wacom tablets as input devices.  
here is a link to Wacom tablet page  
[http://www.wacom.com/en-us/products/pen-tablets/intuos-pro-large](http://www.wacom.com/en-us/products/pen-tablets/intuos-pro-large)

Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 12, 2015, 6:00pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/2 "2015-08-12T18:00:07Z")

</div>

Hi Eghbal,

Insofar as the tablet acts like a mouse or other standard pointing device, you should be able to use MWorks’ “Mouse Input” device to track the stylus position and register clicks. I’ve attached an example experiment that should help you test this. It reports when the mouse cursor moves on and off of the fixation point and when the primary mouse button is pressed and released.

If you want to use additional input data from the tablet (e.g. pressure), then I’ll need to add support for it. Wacom [provides details](http://us.wacom.com/en/developerrelations/macintosh/) of how to support their tablets in Mac applications, so presumably this wouldn’t be too difficult.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 12, 2015, 6:00pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/3 "2015-08-12T18:00:07Z")

</div>

Attachment: [mouse\_input\_demo.xml](https://mworks.discourse.group/uploads/short-url/4u7stCcjUVYMa1UnjFuWDfjlfH4.xml) (4.24 KB)

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 12, 2015, 9:51pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/4 "2015-08-12T21:51:55Z")

</div>

Hi Chris,  
Thanks, I just tested Wacom tablet and it works well. I am trying to now show the mouse position as cursor point on the display. Any ideas on how I can do this.  
Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 13, 2015, 2:35pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/5 "2015-08-13T14:35:03Z")

</div>

Hi Eghbal,

> I am trying to now show the mouse position as cursor point on the display. Any ideas on how I can do this.

I’ve attached an updated example that demonstrates one way to do it.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 13, 2015, 2:35pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/6 "2015-08-13T14:35:03Z")

</div>

Attachment: [mouse\_input\_demo\_with\_cursor.xml](https://mworks.discourse.group/uploads/short-url/aLMGAHYHE1JfustiFtJJJ7NkuyR.xml) (5.01 KB)

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 13, 2015, 4:09pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/7 "2015-08-13T16:09:58Z")

</div>

Hi Chris,

Thanks, this looks good. I notice however that there is a lag between the position of the mouse and the cursor shown by the mworks. I think one easy way to solve this would be to calculate mouse speed and project the position in time to account for the lag time (predicted\_position=v\_mouse\*t\_lag+current\_position). I need to calculate a smooth version of mouse velocity, and was thinking to use eye\_monitor to get the mouse velocity. Do you recommend other approaches?

Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 28, 2015, 8:52pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/8 "2015-08-28T20:52:40Z")

</div>

Hi Chris,  
I was wondering if there is an easy way to calculate mouse(eye) velocity in mworks, so that I can account for the delays in the display of cursor.

Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 31, 2015, 2:25pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/9 "2015-08-31T14:25:45Z")

</div>

Hi Eghbal,

Sorry for not responding sooner.

The eye monitor doesn’t expose the eye velocity to your experiment. While it could be modified to do so, I have doubts about the overall effectiveness of your proposal.

What exactly is your goal here? Do you want a cursor but not want the standard system cursor?

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [September 3, 2015, 11:15am UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/10 "2015-09-03T11:15:54Z")

</div>

Hi Chris,

Sorry that I wasn’t clear previously.  
I tested the setup with the Wacom tablet and there is a discrepancy between the location of the pen and the cursor. In an ideal scenario the cursor location should be a realtime projection of the pen location, and represent where the hand is.  
what strategy can achieve this more efficiently? do you think having a cursor stimuli can help?

Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [September 28, 2015, 2:56pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/11 "2015-09-28T14:56:43Z")

</div>

Hi Eghbal,

As we discussed offline, I’m planning to modify the eye monitor to expose the current eye velocity (both x and y components). However, I’m currently in the process of getting MWorks 0.6 released, and I’m not going to be adding new features to the nightly build until that’s done. I plan to push 0.6 out at the end of this week, so the earliest I’m likely to be able to work on the eye velocity stuff is next week. I hope that won’t be a problem for you.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [September 30, 2015, 2:49pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/12 "2015-09-30T14:49:07Z")

</div>

Hi Chris,

That is no problem. Thanks for letting me know. I will work on other aspect of my design meanwhile.

Best,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [October 26, 2015, 8:42pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/13 "2015-10-26T20:42:23Z")

</div>

Hi Chris,

I was wondering if you’ve had time to make progress the cursor display, I am close to finishing the hardware design.  
Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [October 27, 2015, 1:18pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/14 "2015-10-27T13:18:05Z")

</div>

Hi Eghbal,

> I was wondering if you’ve had time to make progress the cursor display, I am close to finishing the hardware design.

No, but I’ll try to get it done this week.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [October 28, 2015, 3:08pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/15 "2015-10-28T15:08:16Z")

</div>

Hi Eghbal,

I’ve added two optional parameters, `eye_velocity_h` and `eye_velocity_v`, to the eye monitor. If the values of these parameters are variable names, then the calculated eye velocity components will be stored in the specified variables whenever the eye status is computed. This should be available in tonight’s nightly build.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [October 28, 2015, 7:39pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/16 "2015-10-28T19:39:50Z")

</div>

Hi Chris,  
Thanks a lot! I give it a try and let you know how it goes.  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 30, 2015, 3:26pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/17 "2015-11-30T15:26:16Z")

</div>

Hi Chris,

I tested the setup and seems to be working, however there are some jitter in displaying of the cursor and I was wondering if you can take a look. I can set up the system if you have time to look at it today.

Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [December 15, 2015, 1:48pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/18 "2015-12-15T13:48:51Z")

</div>

Hi Chris,

Part of the problem with the delay was stemming from the computer that I was using. The delay is now much shorter and looks like it has to do with frame updates, I was wondering if you could take a look at the setup sometime this week and give me some feedback about what to do next.

Thanks,  
Eghbal

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [December 15, 2015, 6:14pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/19 "2015-12-15T18:14:21Z")

</div>

Hi Eghbal,

Just to recap our offline discussion: I think that our use of high-level system UI events to obtain the on-screen location of the pointing device is introducing a small but noticeable delay in the movement of the MWorks-controlled cursor versus the system one. I will acquire a Wacom tablet and investigate the possibility of getting position and movement data from it at a lower level (ideally via a [USB HID](https://en.wikipedia.org/wiki/USB_human_interface_device_class) interface). Due to my upcoming vacation time, I probably won’t be able to work on this until after the holidays.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [December 21, 2015, 3:28pm UTC](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477/20 "2015-12-21T15:28:59Z")

</div>

Hi Chris,

That sounds great.  
I was wondering how to make mouse cursor invisible, I tried changing the: hide\_cursor=“NO” to YES but it doesn’t make the cursor disappear.

Thanks,  
Eghbla

[Next page](https://mworks.discourse.group/t/mworks-support-for-wacom-tablets/477.md?page=2)
