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-4.1.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

ntnput-4.1.4-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file ntnput-4.1.4.tar.gz.

File metadata

  • Download URL: ntnput-4.1.4.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"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-4.1.4.tar.gz
Algorithm Hash digest
SHA256 f11dcd40951ba865512e071af98fe330cc9217ab4961e1a865f9194249e6165f
MD5 bfb571ce9e15a4f0608258efa97cb549
BLAKE2b-256 8a67a971b1378620bbbc84c81be0663bca16776be9224d44d21fd136d83930f4

See more details on using hashes here.

File details

Details for the file ntnput-4.1.4-py3-none-any.whl.

File metadata

  • Download URL: ntnput-4.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"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-4.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 04ce580333310180c0cb4251e3c73052ce965575d932d4df44395852d7075e37
MD5 f5be97f13eaae8862b4febfb16dc79ef
BLAKE2b-256 ab2e8ecb9a2569aac02c86e89f6d87f68fd702f048e72b42008ac110ee6418f2

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