(Ich habe mir Deine Links noch nicht genauer angeschaut)
Für Tastatur:
Aus meiner Archiv-Sammlung, Achtung: das wirkt global und nicht auf ein Programm bezogen.
Im SetWindowsHookEx als letzten Parameter kannst Du einen Thread benennen, zum Beispiel
GetCurrentThreadId
um nur Dein Programm damit zu blocken.
Müsste auch noch mit Windows 10 klappen, aber ungetestet.
Delphi-Quellcode:
function KBHookHandler(ACode: Integer; WParam: WParam; LParam: LParam) : LResult; stdcall;
begin
if ACode < 0 then
Result := CallNextHookEx(Hook, ACode, WParam, LParam)
else
Result := 1;
end;
function DisableKeyboard: Boolean; stdcall;
begin
if Hook = 0 then
Hook := SetWindowsHookEx(WH_KEYBOARD, @KBHookHandler, HInstance, 0);
Result := Hook <> 0;
end;