Fix: Implement Ctrl+C for selected text in Output Window
Fixes #1729.
This commit introduces a PreviewKeyDown event handler in the ScriptConsole to specifically capture Ctrl+C events when the output WebBrowser control has focus. It then uses IHTMLDocument2 to retrieve the currently selected text and copies it to the clipboard.
This proactive implementation aims to ensure Ctrl+C functionality for selected text as requested in the issue, overriding or supplementing the default WebBrowser behavior which was reported as not working reliably for some of you. Manual testing in a Revit environment is recommended to fully confirm the fix across different scenarios.
Related Issues
If applicable, link the issues resolved by this pull request:
- Resolves #1729
Unable to perform a code review. You have run out of credits 😔 You can buy additional credits from the subscription page.
wrong direction, mshtml is net.5 and under