Kinect v2 Mouse Control w/ Source Code

A mouse control application for Kinect v2, including a couple of options for various uses.

Kinect v2 Mouse Control Form Screenshot

I’m so glad that I’ve just become a Microsoft Kinect MVP since this July, so I think I need to do something more.

One request asked most since the original Kinect came out is, “can I use my hand to control the mouse cursor?” There you can find a few applications for doing this with original Kinect on the web.

These days, some people still asked me for this kind of application for Kinect v2. Then I strangely found there’s no such downloadable applications on the web. I gotta release a Kinect v2 version app. And here’s it, with source code!


  • Mouse Sensitivity
  • Pause-To-Click Time Required
  • The time you hold your hand for as a click

  • Pause Movement Thresold
  • How large the circle range you hold your hand inside for a little while would be a click

  • Cursor Smoothing
  • The large it is, the smoother the cursor would move, more slowly as well.

  • Grip Gesture
    Grip to drag/click
  • Pause To Click
    Hold your hand and don’t move for a little while to click.
  • No clicks, move cursor only

Github: KinectV2MouseControl
EXE files: [download id=”24″]

About TangoChen

Interest driven for tech & music.
This entry was posted in Kinect, Tech. Bookmark the permalink.

19 Responses to Kinect v2 Mouse Control w/ Source Code

  1. Alex says:

    When I run this the light on the Kinect lights but I don’t seem to be able to control the PC cursor. Help?

    • TangoChen says:

      Hi, I just tested again with the app and it worked. It should also work for you.
      Here’re 2 reasons I guess it may cause the problem:

      • Your Kinect is opened but cannot find(detect) your body. Please make sure your body is detectable to the Kinect. Maybe you need to step further and move your hands and feet a little bit so that the Kinect can find your body.
        You can also run Body Basics-WPF the sample application in SDK Browser at the same time. If it’s shows the skeleton view, your body is detected.
      • The Mouse Sensitivity in the app is set too low. Please set it higher or click Default to set it to default value.
  2. kamithekira says:

    Hi can you add distance control cause i must be near of the kinect for the cursor to work well, also add infrared detection to use it in dark room , thank you for your great work ^^

  3. kamithekira says:

    hi, are you planing to make update yes or no ?

  4. Henry says:

    Hi ! Thanks for sharing this great piece of software, its the best one I’ve came across for the Kinect V2, the only thing is the mouse seems to move a lot when you try to click on anything using the grab gesture.
    Would it be possible to set it so you move the mouse with your right hand and then click with the left ?
    Thanks for your time.
    Henry P.

  5. Giuseppe says:

    Thank you very much!
    It’s amazing!
    Is there some way to limit range of hand recognition and improve user switching(2 or 3 persons in front of the camera)?

  6. Amit Sharma says:

    I have downloaded you code. It working with Drag n Drop of items, Cursor Movement.
    But its not working with the OSK (On screen keyboard).

    Can you please let me know that why its not working with On Screen Keyboard.

    Reply Soon.

  7. hasaky says:

    hello my name is hasaky.
    I want to learn how to coding with kinect v2.
    can u suggest some website or material to let me learn kinect v2?

  8. Seethal Joseph says:

    hai how to control double click and Drag ?????
    I download this and working and i need to double click and drag n drop can pls tell me how to ?

  9. kick says:

    hi!! I want to create a program where the pointer follows the hand. Can I tell if I am using processing3 and what function is following it?
    no using kinect v2.

    • TangoChen says:

      Hi kick, I don’t have experiences with processing on that and I don’t know what functions it has. But I’d share a basic idea, to achieve this, usually you need to find functions to get your body joints positions, which includes your hand positions, and shoulder positions used as what I did for increasing stabilities. And map those positions into expected onscreen pointer positions. (They’re in different dimensions, x-axis of your hand position moving 5 units can possibly be expected to have 2000 pixels movement on screen! Then you just multiply the x value, and maybe add a offset value if needs, and so on.. Based on how you want it to move.)

  10. alan torres says:

    I have a question, how do you use it? do I need a special program? or just connect the kineckt to the computer and run the exe ? thanks!

  11. steven chang says:

    Sorry! TangoChen ~ I ask the question, I downloaded Kinect v2 MouseControl.exe, but MouseControl.exe no action! ? I use win7 x64 version, kinect already installed driver. Also, install Visual Studioc 2017. Thank you!

    • TangoChen says:

      Hi Steven, would it work to run other Kinect samples? (Basic demos in SDK browser)
      Just to make sure your Kinect installation and setup is fine for any Kinect apps.

      • steven chang says:

        TangoChen ~ Right! I downloaded [KinectV2MouseControl-master] and I saw it using [C # Code]. Whether [C # code] to compile, you can do it! ? Thank you (p.s: do you have email?)

  12. Pingback: New Kinect Interaction – Angel Wu – Week 02 PPJ – Coalescence

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.