This commit is contained in:
Matthew Hooker 2018-04-12 23:11:14 -07:00
parent 81d127768c
commit f9ad264f4d
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
2 changed files with 3 additions and 2 deletions

View File

@ -15,8 +15,6 @@ TODO:
* comments
* lower-case specials
* check that `<del>` works on parallels. It's different now.
* take `Finalize` out of the Driver interface. let builders that need it
* use it. also rename to `Flush`.
*/
// KeysAction represents what we want to do with a key press.

View File

@ -25,6 +25,9 @@ type pcATDriver struct {
scancodeChunkSize int
}
// NewPCATDriver creates a new boot command driver for VMs that expect PC-AT
// keyboard codes. `send` should send its argument to the VM. `chunkSize` should
// be the maximum number of keyboard codes to send to `send` at one time.
func NewPCATDriver(send SendCodeFunc, chunkSize int) *pcATDriver {
// We delay (default 100ms) between each input event to allow for CPU or
// network latency. See PackerKeyEnv for tuning.