How can I handle Ctrl+C in my IDE plugin?

How can I handle Ctrl+C in my IDE plugin?

I tried OnKeyXXX events but obviously (I logged the events) Ctrl+C get's eaten by the Copy action of the IDE (of course, default behavior of actions).

After I realized that I tried registering an IOTAKeyboardBinding but that only gets triggered when I am in the code editor (but I want it to handle copying text from my plugin window).

I also tried putting an action on my plugin dockform - not working.

Anyone got an idea?

Comments

  1. My first suspicion would be that Ctrl-C is handled not local to the IDE, but by Windows, which might account for your difficulty in intercepting it.

    ReplyDelete
  2. Bill Meyer That is not correct. If you watch the enabled state the IDE Main menu Edit->Copy when you click into several places in the IDE you see that it is context sensitive.

    ReplyDelete
  3. implementing GetEditState + EditAction if you are using INTACustomDockableForm

    ReplyDelete
  4. Uwe Schuster I inherit from TDockableForm - so I guess that also has these methods.

    ReplyDelete
  5. Stefan Glienke I haven't yet overriden them, but yes TDesktopForm defines them too.

    ReplyDelete
  6. I had the same issue (but with an edit on a TDockableForm) and in the end started to use an Action (TAction).

    ReplyDelete

Post a Comment