function KeyName(VKey: word): string;
var
SC: integer;
begin
setlength(result, 256);
SC := MapVirtualKey(VKey, 0) shl 16;
if (SC <> 0) then
begin
setlength(result, GetKeyNameText(SC, pchar(result), 256));
end
else result := 'nicht gefunden';
end;
// Beispielaufruf
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(keyname(32) + #13 + keyname(VK_MENU) + #13 + keyname(VK_CONTROL));
end;