procedure TForm1.ComboBox1CloseUp(Sender: TObject);
begin
if GetKeyState(VK_RETURN) < 0 Then Caption := 'Closed by ENETER KEY';
If GetKeyState(VK_ESCAPE) < 0 THen Caption := 'Closed By ESCAPE KEY';
end;
The LCLintf I believe has the GetKeyState function so this should work across the board.
The main issue with the Combobox Is that it's two controls, while the list is open you don't have direct access
to the list with out hooking into its window procedure.. All you have is notification messages sent to the parent .
In this example, the user will still be holding down the key when this happens.