Question

I am trying to find out the key press of the zoom ring of a wacom tablet, which does scrolling but I am not able to see it in MouseWheel, KeyDown, KeyPress events.

Is there a way to find out the actual key/mouse button press of this control?

enter image description here

Was it helpful?

Solution

My Wacom (Intuos4 S A6 Wide) sends these codes:

   kDn v=18 c=Menu d= Menu, Alt 
   kDn v=188 c=Oemcomma d= Oemcomma, Alt 
   kUp v=188 c=Oemcomma d= Oemcomma, Alt 
   kUp v=18 c=Menu d= Menu 

   kDn v=18 c=Menu d= Menu, Alt 
   kDn v=190 c=OemPeriod d= OemPeriod, Alt 
   kUp v=190 c=OemPeriod d= OemPeriod, Alt 
   kUp v=18 c=Menu d= Menu 

And I captured them like this:

    private void Form2_KeyDown(object sender, KeyEventArgs e)
    {
        log("kDn v=" + e.KeyValue.ToString() + " c=" + e.KeyCode.ToString() + " d= " + e.KeyData.ToString() + " \r\n  ");
    }

    private void Form2_KeyUp(object sender, KeyEventArgs e)
    {
        log("kUp v=" + e.KeyValue.ToString() + " c=" + e.KeyCode.ToString() + " d= " + e.KeyData.ToString() + " \r\n  ");

    }

The first block was captured during a short clockwise movement, the 2nd counterclockwise.

To enable the capturing you must set KeyPreview in the form to true.

I hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top