mitchellh/packer — pull request #425 by Sharpie (2013-09-16 05:07:14+00:00)
Title: Fix VirtualBox scancodes

Support for the backspace, delete and F1-F12 keys was added in commit 6028a3c.
However, that commit seems to have copied character codes from the vmware
builder into the VirtualBox builder. Character codes are appropriate for VMware
which communicates through a VNC. However, VirtualBox communicates through
simulating raw keyboard input and therefore needs scancodes which are key
press/key release sequences.

This patch converts backspace, delete and F1-F10 to scancodes. F11 and F12 are
not listed in the [scancode reference][scancodes] so they have been omitted.

I couldn't find a single Veewee template that uses function keys in the boot command, so there shouldn't be much harm from omitting F11 and F12. Plus, without being expressed as scancodes, these keys are currently broken anyway.

[scancodes]: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html