Skip to main content

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

  1. You can install library using pip:
pip install ntnput
  1. 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:

  1. mouse_move(x, y) - moves mouse from current position
  2. mouse_move_to(x, y) - moves mouse to absolute x, y position
  3. mouse_click(button <default "left">) - clicks mouse
  4. mouse_release(button <default "left">) - releases mouse
  5. mouse_click_and_release(button <default "left">, delay_ms <default 0.0>) - clicks mouse, sleeps, releases

And several functions to interact with keyboard:

  1. keyboard_press(key_code) - presses keyboard button
  2. keyboard_release(key_code) - releases keyboard button
  3. keyboard_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntnput-2.8.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntnput-2.8.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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

Hashes for ntnput-2.8.2.tar.gz
Algorithm Hash digest
SHA256 212a7e6d141e4b3c3b07c9b9556ea70e137c2db8848c884e08b3cbeed1053bd8
MD5 0459899e856908207867e99931b2dadc
BLAKE2b-256 714ea70681f14fbd6fb55ac140b8ea99ec2cabbf91228c65774c0de4b73fddab

See more details on using hashes here.

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

Hashes for ntnput-2.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2374b8b909dedc26e4340c202d2fd07293e8cc0b226ed266332324225b27aa29
MD5 5ae89e794862303adcc6d0c4c0d91749
BLAKE2b-256 bed47bd461ca09628a3d1925ab7c2b4a4a1199a7d821baf72d6dd4e22879f1b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page