The Minimalistic Python library for Windows using wraps of undocumented Nt functions to interact with mouse and keyboard stealthy.
This library uses syscall wraps of undocumented NtUserInjectMouseInput and NtUserInjectKeyboardInput functions from win32u.dll module.
It's makes keyboard and mouse interaction safe and stealth due to the bypass of Windows triggers.
NtNput also works faster than analogues because of usage of builtin ctypes library allowing to interact directly with C and machine code.
You can use this library if your process blocks usage of mouse_event, SendInput or etc. WinAPI functions.
- You can install library using pip:
pip install ntnput
- You can download this repo, put it's folder into your project and import it using the folder name:
Library provides several functions to interact with mouse:
mouse_move(x, y)- moves mouse from current positionmouse_move_to(x, y)- moves mouse to absolute x, y positionmouse_click(button <default "left">)- clicks mousemouse_release(button <default "left">)- releases mousemouse_click_and_release(button <default "left">, delay_ms <default 0.0>)- clicks mouse, sleeps, releases
And several functions to interact with keyboard:
keyboard_press(key_code)- presses keyboard buttonkeyboard_release(key_code)- releases keyboard buttonkeyboard_press_and_release(key_code, delay_ms <default 0.0>)- presses keyboard button, sleeps, releases
You can use official Microsoft documentation to find keyboard key codes definitions.