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

Uploaded Source

Built Distribution

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

ntnput-5.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ntnput-5.0.0.tar.gz
  • Upload date:
  • Size: 8.0 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-5.0.0.tar.gz
Algorithm Hash digest
SHA256 f8e580aa4483a07efd29cc72c6ad39ea2a0bb83bda54ed951b018e15ac081b7c
MD5 d90f98ce17dfc548e7ae56ba9fcdc2ad
BLAKE2b-256 9b63ebfe1a7333ab1c0c568d3126c6f30a17e3d0b134e1fb087bc51be1e830e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ntnput-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3de9000100599feb52909effcd8af9ee6fe504d9c20a6b9304fd1c80aaa08080
MD5 c6151317f090bacf8b8bb8c15f91d0f2
BLAKE2b-256 b097b2c02e3cf548d94f89b6125c8f01bb2f7661491f243c0b803ecadf6c3491

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