From e5fbeb2f11a8a63f2bb0af5665e6d0c85f1c2f12 Mon Sep 17 00:00:00 2001 From: Volth Date: Fri, 19 May 2017 13:56:10 +0000 Subject: [PATCH] test-driver: sendKeys() support for capital letters --- nixos/lib/test-driver/Machine.pm | 36 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index c619264eb949..6be119bbf331 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -617,29 +617,19 @@ sub copyFileFromHost { my %charToKey = ( - '!' => "shift-0x02", - '@' => "shift-0x03", - '#' => "shift-0x04", - '$' => "shift-0x05", - '%' => "shift-0x06", - '^' => "shift-0x07", - '&' => "shift-0x08", - '*' => "shift-0x09", - '(' => "shift-0x0A", - ')' => "shift-0x0B", - '-' => "0x0C", '_' => "shift-0x0C", - '=' => "0x0D", '+' => "shift-0x0D", - '[' => "0x1A", '{' => "shift-0x1A", - ']' => "0x1B", '}' => "shift-0x1B", - ';' => "0x27", ':' => "shift-0x27", - '\'' => "0x28", '"' => "shift-0x28", - '`' => "0x29", '~' => "shift-0x29", - '\\' => "0x2B", '|' => "shift-0x2B", - ',' => "0x33", '<' => "shift-0x33", - '.' => "0x34", '>' => "shift-0x34", - '/' => "0x35", '?' => "shift-0x35", - ' ' => "spc", - "\n" => "ret", + 'A' => "shift-a", 'N' => "shift-n", '-' => "0x0C", '_' => "shift-0x0C", '!' => "shift-0x02", + 'B' => "shift-b", 'O' => "shift-o", '=' => "0x0D", '+' => "shift-0x0D", '@' => "shift-0x03", + 'C' => "shift-c", 'P' => "shift-p", '[' => "0x1A", '{' => "shift-0x1A", '#' => "shift-0x04", + 'D' => "shift-d", 'Q' => "shift-q", ']' => "0x1B", '}' => "shift-0x1B", '$' => "shift-0x05", + 'E' => "shift-e", 'R' => "shift-r", ';' => "0x27", ':' => "shift-0x27", '%' => "shift-0x06", + 'F' => "shift-f", 'S' => "shift-s", '\'' => "0x28", '"' => "shift-0x28", '^' => "shift-0x07", + 'G' => "shift-g", 'T' => "shift-t", '`' => "0x29", '~' => "shift-0x29", '&' => "shift-0x08", + 'H' => "shift-h", 'U' => "shift-u", '\\' => "0x2B", '|' => "shift-0x2B", '*' => "shift-0x09", + 'I' => "shift-i", 'V' => "shift-v", ',' => "0x33", '<' => "shift-0x33", '(' => "shift-0x0A", + 'J' => "shift-j", 'W' => "shift-w", '.' => "0x34", '>' => "shift-0x34", ')' => "shift-0x0B", + 'K' => "shift-k", 'X' => "shift-x", '/' => "0x35", '?' => "shift-0x35", + 'L' => "shift-l", 'Y' => "shift-y", ' ' => "spc", + 'M' => "shift-m", 'Z' => "shift-z", "\n" => "ret", );