locked
How do I detect a multi-finger tap

    Question

  • Is there a way to detect how many touch points are involved in a tap gesture? For example can I differentiate if user tapped the screen with one finger vs two fingers?

    Thanks,

    Raul


    -- Raul

    Friday, April 27, 2012 10:39 PM

Answers

All replies

  • You can differentiate pointer instances by looking at the PointerEventArgs->Pointer->PointerId. If the touch evernt is trigged multiple times with differnt PointID, it means that there are multiple finger touched.

    Best Regards,

    Han Xia

    Saturday, April 28, 2012 3:22 AM
    Moderator
  • Hi Raul,

    For addition, you can use manipulation events to decide if this event is multiple finger. Please check the Using manipulation events section in this document
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465387.aspx#using_manipulation_events

    And this Gestures, manipulations, and interactions
    http://msdn.microsoft.com/en-us/library/windows/apps/hh761498.aspx

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, April 30, 2012 7:34 AM
  • Looking at the Gesture documentation I see the following table.

    Gesture Description
        Tap One finger touches the screen and lifts up.
        Press and hold One finger touches the screen and stays in place.
        Slide One or more fingers touch the screen and move in the same direction.
        Swipe One or more fingers touch the screen and move a short distance in the same direction.
        Rotate Two or more fingers touch the screen and move in a clockwise or counter-clockwise arc.
        Pinch Two or more fingers touch the screen and move closer together.
        Stretch Two or more fingers touch the screen and move farther apart.

    This suggests TAP only registers one finger. All the multi-finger gestures require movement of one or more of the fingers. I was hoping to do on just a TAP event. Let single-finger vs 2-finger, 3-finger, etc accomplish different actions. Would be a shortcut to avoid having to pull-up the App-Bar.

    I could try the PointerID approach. But that would require some sort of timer to distinguish from multi-finger vs multiple successive taps. Could this get confused with a double-tap event? Each tap always has a unique Pointer ID even if I the same finger in succession. Was hoping to find a simpler solution. Or at least some working sample code if this has been done before.

    Monday, April 30, 2012 4:57 PM
  • Hi Raul,

    It is strongly recommended that Manipulations should not be distinguished by the number of fingers used. See Guidelines for user interaction .

    Because it is not recommended, there is no built in facility for two-finger tap vs. one-finger tap.

    --Rob

    Tuesday, May 1, 2012 5:52 PM
    Owner