Skip to content

Commit 360d843

Browse files
committed
VMKeyStrokes: replace tab by (4) spaces
1 parent 5f63e17 commit 360d843

File tree

1 file changed

+74
-74
lines changed

1 file changed

+74
-74
lines changed

powershell/VMKeystrokes.ps1

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
.DESCRIPTION
1111
This function sends a series of character keystrokse to a particular VM
1212
.PARAMETER VMName
13-
The name of a VM to send keystrokes to
14-
.PARAMETER StringInput
15-
The string of characters to send to VM
16-
.PARAMETER DebugOn
17-
Enable debugging which will output input charcaters and their mappings
13+
The name of a VM to send keystrokes to
14+
.PARAMETER StringInput
15+
The string of characters to send to VM
16+
.PARAMETER DebugOn
17+
Enable debugging which will output input charcaters and their mappings
1818
.EXAMPLE
1919
Set-VMKeystrokes -VMName $VM -StringInput "root"
2020
.EXAMPLE
@@ -32,79 +32,79 @@
3232
# Map subset of USB HID keyboard scancodes
3333
# https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
3434
$hidCharacterMap = @{
35-
"a"="0x04";
36-
"b"="0x05";
37-
"c"="0x06";
38-
"d"="0x07";
39-
"e"="0x08";
40-
"f"="0x09";
41-
"g"="0x0a";
42-
"h"="0x0b";
43-
"i"="0x0c";
44-
"j"="0x0d";
45-
"k"="0x0e";
46-
"l"="0x0f";
47-
"m"="0x10";
48-
"n"="0x11";
49-
"o"="0x12";
50-
"p"="0x13";
51-
"q"="0x14";
52-
"r"="0x15";
53-
"s"="0x16";
54-
"t"="0x17";
55-
"u"="0x18";
56-
"v"="0x19";
57-
"w"="0x1a";
58-
"x"="0x1b";
59-
"y"="0x1c";
60-
"z"="0x1d";
61-
"1"="0x1e";
62-
"2"="0x1f";
63-
"3"="0x20";
64-
"4"="0x21";
65-
"5"="0x22";
66-
"6"="0x23";
67-
"7"="0x24";
68-
"8"="0x25";
69-
"9"="0x26";
70-
"0"="0x27";
71-
"!"="0x1e";
72-
"@"="0x1f";
73-
"#"="0x20";
74-
"$"="0x21";
75-
"%"="0x22";
76-
"^"="0x23";
77-
"&"="0x24";
78-
"*"="0x25";
79-
"("="0x26";
80-
")"="0x27";
81-
"_"="0x2d";
82-
"+"="0x2e";
83-
"{"="0x2f";
84-
"}"="0x30";
85-
"|"="0x31";
86-
":"="0x33";
87-
"`""="0x34";
88-
"~"="0x35";
89-
"<"="0x36";
90-
">"="0x37";
91-
"?"="0x38";
92-
"-"="0x2d";
93-
"="="0x2e";
94-
"["="0x2f";
95-
"]"="0x30";
96-
"\"="0x31";
97-
"`;"="0x33";
98-
"`'"="0x34";
99-
","="0x36";
100-
"."="0x37";
101-
"/"="0x38";
102-
" "="0x2c";
35+
"a"="0x04";
36+
"b"="0x05";
37+
"c"="0x06";
38+
"d"="0x07";
39+
"e"="0x08";
40+
"f"="0x09";
41+
"g"="0x0a";
42+
"h"="0x0b";
43+
"i"="0x0c";
44+
"j"="0x0d";
45+
"k"="0x0e";
46+
"l"="0x0f";
47+
"m"="0x10";
48+
"n"="0x11";
49+
"o"="0x12";
50+
"p"="0x13";
51+
"q"="0x14";
52+
"r"="0x15";
53+
"s"="0x16";
54+
"t"="0x17";
55+
"u"="0x18";
56+
"v"="0x19";
57+
"w"="0x1a";
58+
"x"="0x1b";
59+
"y"="0x1c";
60+
"z"="0x1d";
61+
"1"="0x1e";
62+
"2"="0x1f";
63+
"3"="0x20";
64+
"4"="0x21";
65+
"5"="0x22";
66+
"6"="0x23";
67+
"7"="0x24";
68+
"8"="0x25";
69+
"9"="0x26";
70+
"0"="0x27";
71+
"!"="0x1e";
72+
"@"="0x1f";
73+
"#"="0x20";
74+
"$"="0x21";
75+
"%"="0x22";
76+
"^"="0x23";
77+
"&"="0x24";
78+
"*"="0x25";
79+
"("="0x26";
80+
")"="0x27";
81+
"_"="0x2d";
82+
"+"="0x2e";
83+
"{"="0x2f";
84+
"}"="0x30";
85+
"|"="0x31";
86+
":"="0x33";
87+
"`""="0x34";
88+
"~"="0x35";
89+
"<"="0x36";
90+
">"="0x37";
91+
"?"="0x38";
92+
"-"="0x2d";
93+
"="="0x2e";
94+
"["="0x2f";
95+
"]"="0x30";
96+
"\"="0x31";
97+
"`;"="0x33";
98+
"`'"="0x34";
99+
","="0x36";
100+
"."="0x37";
101+
"/"="0x38";
102+
" "="0x2c";
103103
}
104104

105105
$vm = Get-View -ViewType VirtualMachine -Filter @{"Name"="^$($VMName)$"}
106106

107-
# Verify we have a VM or fail
107+
# Verify we have a VM or fail
108108
if(!$vm) {
109109
Write-host "Unable to find VM $VMName"
110110
return

0 commit comments

Comments
 (0)