Aquí va otra para detectar la tecla Tab en un edit:
interface
type
TForm1 = class(TForm)
....
private
procedure CMDialogKey(Var Msg: TWMKey);message CM_DIALOGKEY;
public
end;
...
Código:
procedure TForm1.CMDialogKey(var Msg: TWMKey);
begin
if (ActiveControl is TEdit)and(Msg.Charcode = VK_TAB) then
ShowMessage('Tecla tab presionada');
inherited;
end;
Saludos.