TAdvMemo v13.6.8.2 - Ctrl+C copy fails if Ctrl key is released too quickly

Component: TAdvMemo

Version: v13.6.8.2

Product: TMS VCL UI Pack

Description:Ctrl+C does not reliably trigger the Copy action in TAdvMemo. Copying via the context menu (right-click > Copy) always works correctly, so the clipboard/copy logic itself is functioning - the issue is specifically with the Ctrl+C keyboard shortcut.

Steps to reproduce:

  • Select some text in a TAdvMemo.
  • Press Ctrl+C and release both keys quickly (normal typing speed).
  • Try to paste elsewhere - nothing was copied.
  • Repeat, but this time hold the Ctrl key down noticeably longer before releasing.
  • The copy now succeeds.

Observation:The behavior appears to depend on how long the Ctrl key is held down, not just on the key-down event itself. This suggests that the Copy shortcut handling may be checking the current keyboard state (e.g. via GetKeyState/GetAsyncKeyState) at a slightly delayed point in time, rather than acting synchronously on the KeyDown/KeyPress event where Shift/Ctrl state is passed directly. If Ctrl is released before that delayed check happens, the Copy command is silently dropped.

Note: I found that TMS fixed a similar-sounding issue ("Issue with repeated Ctrl-C keypresses in TAdvMemo") in v13.6.4.1. Since I'm on a later version (v13.6.8.2), this appears to be either a regression or a separate, related issue.

Could you please investigate?

Thanks!

We've investigated and you're correct that when Ctrl key is released earlier than C key, the Clipboard Copy is not happening. So we fixed this and further ensured that when pressing Ctrl and C for a long time, the OnClipboardAction is not triggered repeatedly.
This fix will be in the next TMS VCL UI Pack release.