Пример #1
0
        private void OnKeyPressed(CoreWindow sender, KeyEventArgs args)
        {
            //
            // TODO: Bluetooth keyboards are supported by HoloLens. You can use this method for
            //       keyboard input if you want to support it as an optional input method for
            //       your holographic app.
            //
            // Allow the user to interact with the holographic world using the mouse.

            var now = DateTime.Now;

            args.Handled = true;

            var delta = (now - lastEvent).TotalMilliseconds;

            if (delta < 100)
            {
                return;
            }

            lastEvent = now;

            if (null != main)
            {
                main.OnKeyPressed(args.VirtualKey);
            }
        }