Minimalist Python library using wraps of undocumented `Nt` functions to interact with mouse and keyboard stealthy
Project description
ntnput
The Minimalist Python library for Windows using wraps of undocumented Nt functions to interact with mouse and keyboard stealthy.
Details
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.
Installation
- 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
Usage
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ntnput-2.8.2.tar.gz.
File metadata
- Download URL: ntnput-2.8.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
212a7e6d141e4b3c3b07c9b9556ea70e137c2db8848c884e08b3cbeed1053bd8
|
|
| MD5 |
0459899e856908207867e99931b2dadc
|
|
| BLAKE2b-256 |
714ea70681f14fbd6fb55ac140b8ea99ec2cabbf91228c65774c0de4b73fddab
|
File details
Details for the file ntnput-2.8.2-py3-none-any.whl.
File metadata
- Download URL: ntnput-2.8.2-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2374b8b909dedc26e4340c202d2fd07293e8cc0b226ed266332324225b27aa29
|
|
| MD5 |
5ae89e794862303adcc6d0c4c0d91749
|
|
| BLAKE2b-256 |
bed47bd461ca09628a3d1925ab7c2b4a4a1199a7d821baf72d6dd4e22879f1b4
|