Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8674

Hack for Ctrl+C and Ctrl+V

$
0
0

Hi everyone,

I want to hack a bit result of !_CopyToClipBoard (Ctrl+V) and !_Paste (Ctrl+C) commands. Rhino copies objects at the same location with this commands but I need to move new objects a bit in order to help user to show there is no overlapping with copied objects.

I have CopyFlag in my controller to understand objects is copying or not in the;

private void RhinoDoc_AddRhinoObject(object sender, RhinoObjectEventArgs e)
{
    if (e?.TheObject != null && IsPluginObject(e.TheObject) && CopyFlag)
    {
    // Add the new object to the helper
    CopyGroupHelper.Add(e.TheObject);
    // Hook up the idle handler
    EnableIdleEventHandler();
    }
}

What is the best practice to get Ctrl+C or Ctrl+V events.

RhinoApp.KeyboardEvent += RhinoApp_KeyboardEvent;

private void RhinoApp_KeyboardEvent(int key)
{
     throw new NotImplementedException();
}

I tried to use this one but it doesn’t make sense to me. Do you have any suggestion?
Best,
-Oğuzhan

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 8674

Trending Articles