remove duplicated press

This commit is contained in:
Moss
2020-06-12 14:51:52 +02:00
parent 585a86fe03
commit ba767d1663
3 changed files with 6 additions and 42 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import (
"github.com/hashicorp/packer/template/interpolate"
"github.com/vmware/govmomi/vim25/types"
"golang.org/x/mobile/event/key"
"log"
"time"
)
@@ -91,11 +92,11 @@ func (s *StepBootCommand) Run(ctx context.Context, state multistep.StateBag) mul
case key.CodeLeftControl:
// <leftCtrlOn>
keyCtrl = downs[i]
case key.CodeLeftShift:
// <leftShiftOn>
default:
keyShift = downs[i]
}
log.Printf("Sending code %s, shift %v", code, downs[i])
spec.KeyEvents = append(spec.KeyEvents, types.UsbScanCodeSpecKeyEvent{
UsbHidCode: int32(code)<<16 | 7,
Modifiers: &types.UsbScanCodeSpecModifierType{
@@ -26,7 +26,6 @@ func TestStepBootCommand_Run(t *testing.T) {
Config: &BootConfig{
BootConfig: bootcommand.BootConfig{
BootCommand: []string{
" initrd=/install/initrd.gz",
"<leftShiftOn><enter><wait><f6><wait><esc><wait>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",