Update comments to reflect current implementation

This commit is contained in:
Chris Bednarski 2017-01-14 20:11:51 -08:00
parent ee2d636840
commit 6ad702ad74
2 changed files with 4 additions and 6 deletions

View File

@ -148,9 +148,8 @@ func vncSendString(c *vnc.ClientConn, original string) {
shiftedChars := "~!@#$%^&*()_+{}|:\"<>?" shiftedChars := "~!@#$%^&*()_+{}|:\"<>?"
waitRe := regexp.MustCompile(`^<wait([0-9hms]+)>`) waitRe := regexp.MustCompile(`^<wait([0-9hms]+)>`)
// Send the key events. We add a 100ms sleep after each key event // We delay (default 100ms) between each key event to allow for CPU or
// to deal with network latency and the OS responding to the keystroke. // network latency. See PackerKeyEnv for tuning.
// It is kind of arbitrary but it is better than nothing.
keyInterval := common.PackerKeyDefault keyInterval := common.PackerKeyDefault
if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil { if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil {
keyInterval = delay keyInterval = delay

View File

@ -179,9 +179,8 @@ func vncSendString(c *vnc.ClientConn, original string) {
shiftedChars := "~!@#$%^&*()_+{}|:\"<>?" shiftedChars := "~!@#$%^&*()_+{}|:\"<>?"
// Send the key events. We add a 100ms sleep after each key event // We delay (default 100ms) between each key event to allow for CPU or
// to deal with network latency and the OS responding to the keystroke. // network latency. See PackerKeyEnv for tuning.
// It is kind of arbitrary but it is better than nothing.
keyInterval := common.PackerKeyDefault keyInterval := common.PackerKeyDefault
if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil { if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil {
keyInterval = delay keyInterval = delay