From 6ad702ad74ab69ec8066add77650492cb28bb87a Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Sat, 14 Jan 2017 20:11:51 -0800 Subject: [PATCH] Update comments to reflect current implementation --- builder/qemu/step_type_boot_command.go | 5 ++--- builder/vmware/common/step_type_boot_command.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index 7dbba9134..af9334818 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -148,9 +148,8 @@ func vncSendString(c *vnc.ClientConn, original string) { shiftedChars := "~!@#$%^&*()_+{}|:\"<>?" waitRe := regexp.MustCompile(`^`) - // Send the key events. We add a 100ms sleep after each key event - // to deal with network latency and the OS responding to the keystroke. - // It is kind of arbitrary but it is better than nothing. + // We delay (default 100ms) between each key event to allow for CPU or + // network latency. See PackerKeyEnv for tuning. keyInterval := common.PackerKeyDefault if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil { keyInterval = delay diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go index d29d28a88..b3cc02b79 100644 --- a/builder/vmware/common/step_type_boot_command.go +++ b/builder/vmware/common/step_type_boot_command.go @@ -179,9 +179,8 @@ func vncSendString(c *vnc.ClientConn, original string) { shiftedChars := "~!@#$%^&*()_+{}|:\"<>?" - // Send the key events. We add a 100ms sleep after each key event - // to deal with network latency and the OS responding to the keystroke. - // It is kind of arbitrary but it is better than nothing. + // We delay (default 100ms) between each key event to allow for CPU or + // network latency. See PackerKeyEnv for tuning. keyInterval := common.PackerKeyDefault if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil { keyInterval = delay