Yep, I don't know why, but the fact to use a "key filter" for the text box entries kill the ability to use the CTRL V/C .. I never find how to solve this problem.
It is the reversed of what happens in CamBam text editor (text object and GCode editor), no context menus but the CTRL C/V works ...
David,
This tip comes from my cyber friend — Microsoft Copilot 🤖 — who helps me understand a lot of things… though sometimes it slips up too 😅. Still, it's been a great companion for debugging quirky code behavior!
<Copilot>
You're absolutely right — using a "key filter" or intercepting keyboard events in a Visual Basic TextBox can unintentionally disable standard shortcuts like Ctrl+V or Ctrl+C.
This happens because when you handle KeyDown, KeyPress, or PreviewKeyDown events, you might be overriding or suppressing the default behavior that Windows provides for those shortcuts.
To fix this, you can try the following:
✅ Allow Ctrl+V explicitly in your key filter
If you're using KeyDown, check for Ctrl+V and manually trigger the paste:
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
If e.Control AndAlso e.KeyCode = Keys.V Then
TextBox1.Paste()
e.Handled = True
End If
End SubThis ensures that Ctrl+V still works even if you're filtering other keys.
⚠️ Avoid blocking default behavior
If you're setting e.Handled = True or KeyCode = 0 for all keys, make sure you're not doing that for Ctrl+V or Ctrl+C unless you intend to block them.
</Copilot>
HTH
Ricardo