From 6088c1887cd3de863b4d8e87072ceb449c8ba1d3 Mon Sep 17 00:00:00 2001 From: "febc.yamamoto" Date: Fri, 4 Nov 2016 19:14:18 +0900 Subject: [PATCH] Fix keycodes for ctrl,shift and alt key when sending over VNC --- builder/qemu/step_type_boot_command.go | 22 +++++++++---------- .../vmware/common/step_type_boot_command.go | 22 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index 6138f6cdd..804f7621d 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -165,7 +165,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -179,7 +179,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -193,7 +193,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -207,7 +207,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -221,7 +221,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -235,7 +235,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -249,7 +249,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -263,7 +263,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -277,7 +277,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -291,7 +291,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -305,7 +305,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go index 96bccf2c4..99c08ed2c 100644 --- a/builder/vmware/common/step_type_boot_command.go +++ b/builder/vmware/common/step_type_boot_command.go @@ -194,7 +194,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -205,7 +205,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -216,7 +216,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -227,7 +227,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -238,7 +238,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -249,7 +249,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -260,7 +260,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -271,7 +271,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -282,7 +282,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -293,7 +293,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode) @@ -304,7 +304,7 @@ func vncSendString(c *vnc.ClientConn, original string) { } if strings.HasPrefix(original, "") { - keyCode = special[""] + keyCode = special[""] original = original[len(""):] log.Printf("Special code '' found, replacing with: %d", keyCode)