Title: Detect insert-key statusUse GetKeyStatus function with VK_INSERT parameter.procedure TForm1.Button1Click(Sender: TObject);begin if GetKeyState(VK_INSERT)=0 then Label1.Caption:='Insert' else Label1.Caption:='Replace';end;