SmartFox: launcher, Siri Remote driver, Debian image and installer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
14
tools/vm/vmkey.sh
Normal file
14
tools/vm/vmkey.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sends key presses to the VM through the QEMU monitor (like a real keyboard).
|
||||
# vmkey.sh esc ret f12 vmkey.sh --hold esc 1.2
|
||||
if [ "$1" = "--hold" ]; then
|
||||
# QEMU sendkey with a hold time in ms
|
||||
ms=$(awk "BEGIN {print int(${3:-1} * 1000)}")
|
||||
echo "sendkey $2 $ms" | socat - UNIX-CONNECT:/root/qemu-monitor.sock >/dev/null
|
||||
sleep "${3:-1}"
|
||||
exit 0
|
||||
fi
|
||||
for k in "$@"; do
|
||||
echo "sendkey $k" | socat - UNIX-CONNECT:/root/qemu-monitor.sock >/dev/null
|
||||
sleep 0.3
|
||||
done
|
||||
Reference in New Issue
Block a user