Skip to main content

Transmit keystrokes to a running vSphere virtual machine via pyvmomi.

Can be used either as a command-line tool directly, or import as a module.

Usage

usage: send-keys-to-vm [--file in.txt] [--characters 'a long line of text'] [--raw-scancode I]
                       [--modifier {shift,alt,meta,ctrl}] [--moref MOREF] [--uuid UUID] [--ip IP] [-v] [--whatif]
                       [--insecure] [--hostname vCenter Server or ESXi host] [--port vCenter Server Port]
                       [--username USERNAME] [--password PASSWORD]
                       [keys ...]

Examples

Pass characters as a quoted string.

send-keys-to-vm --characters "sudo tailscale up --auth-key=tskey-auth-1234567890 --ssh"

Open a config file for appending, then stream in some text.

echo "cat >> .ssh/authorized_keys" | send-keys-to-vm --moref 24
`cat ~/.ssh/id_rsa.pub | send-keys-to-vm --moref 24 --file -`
.venv/bin/send-keys-to-vm --moref 24 ctrl+d

Dump raw KeyEvent list.

send-keys-to-vm a b C ctrl+d --whatif

(vim.vm.UsbScanCodeSpec.KeyEvent) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   usbHidCode = 262151,
   modifiers = <unset>
}
(vim.vm.UsbScanCodeSpec.KeyEvent) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   usbHidCode = 327687,
   modifiers = <unset>
}
(vim.vm.UsbScanCodeSpec.KeyEvent) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   usbHidCode = 393223,
   modifiers = (vim.vm.UsbScanCodeSpec.ModifierType) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      leftControl = <unset>,
      leftShift = true,
      leftAlt = <unset>,
      leftGui = <unset>,
      rightControl = <unset>,
      rightShift = <unset>,
      rightAlt = <unset>,
      rightGui = <unset>
   }
}
(vim.vm.UsbScanCodeSpec.KeyEvent) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   usbHidCode = 458759,
   modifiers = (vim.vm.UsbScanCodeSpec.ModifierType) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      leftControl = true,
      leftShift = <unset>,
      leftAlt = <unset>,
      leftGui = <unset>,
      rightControl = <unset>,
      rightShift = <unset>,
      rightAlt = <unset>,
      rightGui = <unset>
   }
}

Metadata

Release files for send-keys-to-vm 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for send-keys-to-vm 1.1.1
File Size Uploaded
send_keys_to_vm-1.1.1.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for send-keys-to-vm 1.1.1
File Interpreter ABI Platform
send_keys_to_vm-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / send_keys_to_vm-1.1.1.tar.gz

Download URL send_keys_to_vm-1.1.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
80b00ed91e9025af7444086172911c52b4ca969a8c53ca7a711050bb613d6dd2
BLAKE2b-256 checksum
How to use checksums
d9a7245bf2abf3ca9d6bddaf54e97255784aff2832f77327bef04cc16565a0fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / send_keys_to_vm-1.1.1-py3-none-any.whl

Download URL send_keys_to_vm-1.1.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
340efc59653774c6dc61b2aca3a9039e657916c74df1f49d1e97b48370acb8e5
BLAKE2b-256 checksum
How to use checksums
dc0d4a9f304c06473a62c33ee175fc86c71d32f518f3a4ca7938d8a4cc40ba05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page