Commit 494e5cd7 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Add example script for injecting keycodes

parent fa21e3d2
# -*- perl -*-
use strict;
use warnings;
use Sys::Virt;
die "syntax: $0 URI DOMAIN-NAME\n" unless int(@ARGV) == 2;
my $uri = shift @ARGV;
my $domname = shift @ARGV;
print "Addr $uri\n";
my $con = Sys::Virt->new(address => $uri, readonly => 0);
my $dom = $con->get_domain_by_name($domname);
my @codes = (
35, 18, 38, 38, 24,
57,
17, 24, 19, 38, 32,
28,
);
$dom->send_key(Sys::Virt::Domain::KEYCODE_SET_LINUX,
100,
\@codes);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment