alt, ctrl, and shift should be outside variables (#9702)

This commit is contained in:
jhawk28 2020-08-05 11:36:40 -04:00 committed by GitHub
parent 825deef43d
commit 6b8d086e94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -76,15 +76,14 @@ func (s *StepBootCommand) Run(ctx context.Context, state multistep.StateBag) mul
ui.Say(fmt.Sprintf("HTTP server is working at http://%v:%v/", ip, port))
}
var keyAlt, keyCtrl, keyShift bool
sendCodes := func(code key.Code, down bool) error {
var keyAlt, keyCtrl, keyShift bool
switch code {
case key.CodeLeftAlt:
keyAlt = down
case key.CodeLeftControl:
keyCtrl = down
default:
case key.CodeLeftShift:
keyShift = down
}