Mega Search
23.2 Million


Sign Up

Make a donation  
what key  
News Group: embarcadero.public.delphi.thirdpartytools.intraweb

Hi,

In a AsyncKeyDown event of an TIWEdit. Can I catch what key the user 
pressed?


Mikael

Vote for best question.
Score: 8  # Vote:  2
Date Posted: 11-Dec-2012, at 5:21 AM EST
From: Mikael Nilsson
 
Re: what key [Edit]  
News Group: embarcadero.public.delphi.thirdpartytools.intraweb
> In a AsyncKeyDown event of an TIWEdit. Can I catch what key the user 
> pressed?

Use the EventParams parameter and the 'which' param

{code}
procedure TIWForm1.IWEdit1AsyncKeyPress(Sender: TObject; EventParams: TStringList);
var
  lKey: char;
begin
  lKey := Chr(StrToInt(EventParams.Values['which']));
  WebApplication.ShowMessage(lKey);
end;
{code}

Vote for best answer.
Score: 8.5  # Vote:  4
Date Posted: 12-Dec-2012, at 1:12 AM EST
From: Jackson Gomes