I tried to detect Ctrl+ Vfrom the event TEdit OnKeyPress, and I noticed that the parameter Keytakes an unusual value when you press Ctrl+ AnyKey.
I prepared an example:
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
ShowMessage(IntToStr(Ord(Key)));
end;
It produces the following results:
- Ctrl+ Q17
- Ctrl+ W23
- Ctrl+ E5
- Ctrl+ R18
- ...
- Ctrl+ A1
- Ctrl+ Z26
- Ctrl+ C3
- Ctrl+ V22
- Ctrl+ X24
I don’t understand how the keys are translated, what do these codes mean?
It seems to have nothing to do with the ASCII table :

Can anyone shed some light on this?