I have Two listboxes and both with Multiselect:=True. I have a popup menu that Copy/Paste to/from the Clipboard for the selected items. All works as intended.
I wanted to add keyboard CtrlC (Copy) and Ctrl+V (Paste) but after selecting items, then using Ctrl-C, the Selected items all lose selection and the first item in the list is selected and it gets copied to the Clipboard.
I am using the KeyPreview and main form OnKeyUp
if (ssCtrl in Shift) then
begin
case Char(Key) of
'c','C' : puCopyClick(Sender);
'v','V' : puPasteClick(Sender);
end;
Exit;
end;
case Key of
VK_Delete : puDeleteClick(Self);
end;
Exit;
How can I make the Ctrl+C etc work as the popup does?
Thanks