RhinoCommon KeyboarEvent bug

        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            var gp = new Rhino.Input.Custom.GetPoint();
            RhinoApp.KeyboardEvent += OnKeyboar;

            while (true)
            {
                gp.Get();
                if (gp.CommandResult() != Result.Success)
                    break;
            }

            RhinoApp.KeyboardEvent -= OnKeyboar;
            return Result.Success;
		}

        private void OnKeyboar(int key)
        {
            RhinoApp.WriteLine("The key value is:{0}", key);
        }

If you switch to other software and then switch back to Rhino, the KeyboarEvent will be lost.

Hi @Easy,

Can you explain what really you are trying to do? I see you want to trap keyboard events, but why?

– Dale

Hi @dale
I want to modify the value of the command option by listening to keyboard events. If everything is normal without leaving Rhino, but if I switch to other software in the middle, and then return to Rhino, the keyboard events will be lost and I can only re-execute the command.

Hi @Easy,

OK, I can repeat this. I am looking into this.

Thanks,

– Dale