Yo te puedo ayudar, pero lo que te voy a decir anula tanto el teclado como el raton.
Usaremos una función que viene en el user32.dll denominada "BlockInput", y que corta toda comunicación con los periféricos del usuario (teclado y ratón)
Código Delphi
[-]
private
function FunctionExists(LaFunction: string;DllFile:string; var p: pointer): boolean;
public
procedure SetInput(Stat: boolean);
function TForm1.FunctionExists(LaFunction: string;DllFile:string; var p: pointer): boolean;
var
lib: THandle;
begin
Result := false;
p := NIL;
if LoadLibrary(PChar(DllFile)) = 0 then exit; lib := GetModuleHandle(PChar(DllFile)); if lib <> 0 then begin
p := GetProcAddress(lib, PChar(LaFunction));
if p <> NIL then Result := true;
end;
end;
procedure TForm1.SetInput(Stat: Boolean);
var
xBlockInput : function(Block: BOOL): BOOL; stdcall;
begin
if FunctionExists('BlockInput','USER32.DLL', @xBlockInput) then xBlockInput(Stat)
else showmessage('No se pudo cargar la función especificada');
end;
Puedes hacer pruebas poniendo un timer a 5, 10 seg... para que te desbloquee el teclado, ¡o si nos deberás reiniciar el PC!
"FunctionExists" te sirve para cargar y ejecutar cualquier proceso o función que necesites
Suerte