From e4cfcb2a8ada6ad82aaf3f784a9651d8cb7697d1 Mon Sep 17 00:00:00 2001 From: Myles Steinhauser Date: Fri, 10 Jan 2014 12:40:43 -0500 Subject: [PATCH] Add more special scancodes --- builder/qemu/step_type_boot_command.go | 11 +++++++++++ builder/virtualbox/iso/step_type_boot_command.go | 10 ++++++++++ builder/vmware/iso/step_type_boot_command.go | 11 +++++++++++ 3 files changed, 32 insertions(+) diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index 3b2dd62ad..9bf195669 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -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..e6e06b4ac 100644 --- a/builder/virtualbox/iso/step_type_boot_command.go +++ b/builder/virtualbox/iso/step_type_boot_command.go @@ -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..581f8003e 100644 --- a/builder/vmware/iso/step_type_boot_command.go +++ b/builder/vmware/iso/step_type_boot_command.go @@ -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 := "~!@#$%^&*()_+{}|:\"<>?"