diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index 3b2dd62ad..5fdc90ca3 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -16,9 +16,9 @@ import ( const KeyLeftShift uint32 = 0xFFE1 type bootCommandTemplateData struct { - HTTPIP string + HTTPIP string HTTPPort uint - Name string + Name string } // This step "types" the boot command into the VM over VNC. @@ -92,6 +92,7 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction func (*stepTypeBootCommand) Cleanup(multistep.StateBag) {} func vncSendString(c *vnc.ClientConn, original string) { + // Scancodes reference: https://github.com/qemu/qemu/blob/master/ui/vnc_keysym.h special := make(map[string]uint32) special[""] = 0xFF08 special[""] = 0xFFFF @@ -111,6 +112,16 @@ func vncSendString(c *vnc.ClientConn, original string) { special[""] = 0xFFC9 special[""] = 0xFF0D special[""] = 0xFF09 + special[""] = 0xFF52 + special[""] = 0xFF54 + special[""] = 0xFF51 + special[""] = 0xFF53 + special[""] = 0x020 + special[""] = 0xFF63 + special[""] = 0xFF50 + special[""] = 0xFF57 + special[""] = 0xFF55 + special[""] = 0xFF56 shiftedChars := "~!@#$%^&*()_+{}|:\"<>?" diff --git a/builder/virtualbox/iso/step_type_boot_command.go b/builder/virtualbox/iso/step_type_boot_command.go index d479b84e0..e5f90b36d 100644 --- a/builder/virtualbox/iso/step_type_boot_command.go +++ b/builder/virtualbox/iso/step_type_boot_command.go @@ -15,9 +15,9 @@ import ( const KeyLeftShift uint32 = 0xFFE1 type bootCommandTemplateData struct { - HTTPIP string + HTTPIP string HTTPPort uint - Name string + Name string } // This step "types" the boot command into the VM over VNC. @@ -118,6 +118,16 @@ func scancodes(message string) []string { special[""] = []string{"44", "c4"} special[""] = []string{"1c", "9c"} special[""] = []string{"0f", "8f"} + special[""] = []string{"48", "c8"} + special[""] = []string{"50", "d0"} + special[""] = []string{"4b", "cb"} + special[""] = []string{"4d", "cd"} + special[""] = []string{"39", "b9"} + special[""] = []string{"52", "d2"} + special[""] = []string{"47", "c7"} + special[""] = []string{"4f", "cf"} + special[""] = []string{"49", "c9"} + special[""] = []string{"51", "d1"} shiftedChars := "~!@#$%^&*()_+{}|:\"<>?" diff --git a/builder/vmware/iso/step_type_boot_command.go b/builder/vmware/iso/step_type_boot_command.go index 89e7ac432..d021d5d58 100644 --- a/builder/vmware/iso/step_type_boot_command.go +++ b/builder/vmware/iso/step_type_boot_command.go @@ -18,9 +18,9 @@ import ( const KeyLeftShift uint32 = 0xFFE1 type bootCommandTemplateData struct { - HTTPIP string + HTTPIP string HTTPPort uint - Name string + Name string } // This step "types" the boot command into the VM over VNC. @@ -116,6 +116,7 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction func (*stepTypeBootCommand) Cleanup(multistep.StateBag) {} func vncSendString(c *vnc.ClientConn, original string) { + // Scancodes reference: https://github.com/qemu/qemu/blob/master/ui/vnc_keysym.h special := make(map[string]uint32) special[""] = 0xFF08 special[""] = 0xFFFF @@ -135,6 +136,16 @@ func vncSendString(c *vnc.ClientConn, original string) { special[""] = 0xFFC9 special[""] = 0xFF0D special[""] = 0xFF09 + special[""] = 0xFF52 + special[""] = 0xFF54 + special[""] = 0xFF51 + special[""] = 0xFF53 + special[""] = 0x020 + special[""] = 0xFF63 + special[""] = 0xFF50 + special[""] = 0xFF57 + special[""] = 0xFF55 + special[""] = 0xFF56 shiftedChars := "~!@#$%^&*()_+{}|:\"<>?"