Redrawing DynamicDraw

I am trying to redraw a size change, but it will not redraw unless I move the mouse.
Is there any way to make it redraw at the moment I press it if I have assigned a key?

best

void KeybordEvent(int key)
{
   if (key == VK_A)
   {
      A_key_pressed = true;
   }
}

You need a reference to the document, then issue the following inside the KeyboardEvent handler:

RhinoDoc doc; // obtained elsewhere
doc.Views.Redraw();

Sorry, Some were missing.

What I mean is

void KeybordEvent(int key)
{
   if (key == VK_A)
   {
      A_key_pressed = true;
   }
   doc.Views.Redraw();
}

I tried the same thing and it didn’t work, but when I defined it in RunCommand it worked fine.
Thank you so much.

What is the difference between this method and the other?

public delegate void KeyboardHookEvent(
	int key
)