Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

How do I interface a HoloLens Clicker with my C# App?

Yes a work colleague overseas has a HoloLens and Clicker device and I am trying to interface it to the App I am writing. I have a HoloLens Emulator and thought (maybe incorrectly) that it was click similar to a click from a Mouse or Keypad Key. I have tried Carriage Return and the Left and Right Mouse Buttons. Obviously it works on the Emulator using the Keyboard button on the right hand menu strip instead of the button with the little man on it. It of course fails using a proper Hololens with the Clicker. Here is a snippet of my code:-

    void Update ()
    {
        if(count>0)
        {
            count--;
            addcomment.comment = myselect;
        }
        // if (Input.GetKey(KeyCode.Return))
        if (Input.GetMouseButtonDown(0))
        {
            switch (clickmode)
            {
                case ClickMode.selectclick: OnSelectClick(); break;
                case ClickMode.selectlineclick: OnSelectLineClick(); break;
                case ClickMode.selectfreeze: OnSelectFreeze(); break;
                case ClickMode.selectlinefreeze: OnSelectLineFreeze(); break;
            }
        }
    }

Now using the Emulator a frozen still looks like this:-

Excuse the Warrior Princess. I just downloaded it to see if it would work in the environment and indeed she does even though she is only sparring. Any Guru out there got information on how I can interface the HoloLens Clicker in my code?

Best Answers

  • PatrickPatrick mod
    Answer ✓

    Hey wheelchairman,

    You interact with the clicker the same way you interact with hands. All of the information here should apply.

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Answer ✓

    Yep, Clicking the clicker should raise the same event as an air tap, and click and hold should be the same as that gesture with hands.

Answers

  • PatrickPatrick mod
    Answer ✓

    Hey wheelchairman,

    You interact with the clicker the same way you interact with hands. All of the information here should apply.

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Answer ✓

    Yep, Clicking the clicker should raise the same event as an air tap, and click and hold should be the same as that gesture with hands.

  • Hi Patrick and Jesse,
    Thank you both for reminding me of something I completely overlooked. It is so obvious it should have been intuitive. I think my question is answered.

Sign In or Register to comment.