Skip to content

Instantly share code, notes, and snippets.

@stil
stil / ProxmoxAutoType.js
Last active January 23, 2025 14:42
Auto type in noVNC (Proxmox)
(async () => {
const text = prompt("Enter text to type:");
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const input = document.getElementById("noVNC_keyboardinput");
const keydown = (key) => input.dispatchEvent(new KeyboardEvent("keydown", { key }));
for (let i = 0; i < text.length; i++) { keydown(text[i]); await sleep(50); }
})();