Also you can try like this: procedure TUniLoginForm1.UniLoginFormKeyDown(Sender: TObject; var Key: Word;   Shift: TShiftState); begin   if Key = VK_RETURN then     with UniButton1 do       JSInterface.JSCall('fireEvent', ['click', JSControl]); end;