Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
875314e9
Commit
875314e9
authored
Sep 15, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #425 from Sharpie/fix-vbox-scancodes
builder/virtualbox: fix scancodes for F1-F12 and delete
parents
eaba28a3
4952737d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
builder/virtualbox/step_type_boot_command.go
builder/virtualbox/step_type_boot_command.go
+20
-15
No files found.
builder/virtualbox/step_type_boot_command.go
View file @
875314e9
...
@@ -92,29 +92,34 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction
...
@@ -92,29 +92,34 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction
func
(
*
stepTypeBootCommand
)
Cleanup
(
multistep
.
StateBag
)
{}
func
(
*
stepTypeBootCommand
)
Cleanup
(
multistep
.
StateBag
)
{}
func
scancodes
(
message
string
)
[]
string
{
func
scancodes
(
message
string
)
[]
string
{
// Scancodes reference: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
//
// Scancodes represent raw keyboard output and are fed to the VM by the
// VBoxManage controlvm keyboardputscancode program.
//
// Scancodes are recorded here in pairs. The first entry represents
// the key press and the second entry represents the key release and is
// derived from the first by the addition of 0x81.
special
:=
make
(
map
[
string
][]
string
)
special
:=
make
(
map
[
string
][]
string
)
special
[
"<bs>"
]
=
[]
string
{
"
ff"
,
"08
"
}
special
[
"<bs>"
]
=
[]
string
{
"
0e"
,
"8e
"
}
special
[
"<del>"
]
=
[]
string
{
"
ff"
,
"ff
"
}
special
[
"<del>"
]
=
[]
string
{
"
53"
,
"d3
"
}
special
[
"<enter>"
]
=
[]
string
{
"1c"
,
"9c"
}
special
[
"<enter>"
]
=
[]
string
{
"1c"
,
"9c"
}
special
[
"<esc>"
]
=
[]
string
{
"01"
,
"81"
}
special
[
"<esc>"
]
=
[]
string
{
"01"
,
"81"
}
special
[
"<f1>"
]
=
[]
string
{
"ff"
,
"be"
}
special
[
"<f1>"
]
=
[]
string
{
"3b"
,
"bb"
}
special
[
"<f2>"
]
=
[]
string
{
"ff"
,
"bf"
}
special
[
"<f2>"
]
=
[]
string
{
"3c"
,
"bc"
}
special
[
"<f3>"
]
=
[]
string
{
"ff"
,
"c0"
}
special
[
"<f3>"
]
=
[]
string
{
"3d"
,
"bd"
}
special
[
"<f4>"
]
=
[]
string
{
"ff"
,
"c1"
}
special
[
"<f4>"
]
=
[]
string
{
"3e"
,
"be"
}
special
[
"<f5>"
]
=
[]
string
{
"ff"
,
"c2"
}
special
[
"<f5>"
]
=
[]
string
{
"3f"
,
"bf"
}
special
[
"<f6>"
]
=
[]
string
{
"ff"
,
"c3"
}
special
[
"<f6>"
]
=
[]
string
{
"40"
,
"c0"
}
special
[
"<f7>"
]
=
[]
string
{
"ff"
,
"c4"
}
special
[
"<f7>"
]
=
[]
string
{
"41"
,
"c1"
}
special
[
"<f8>"
]
=
[]
string
{
"ff"
,
"c5"
}
special
[
"<f8>"
]
=
[]
string
{
"42"
,
"c2"
}
special
[
"<f9>"
]
=
[]
string
{
"ff"
,
"c6"
}
special
[
"<f9>"
]
=
[]
string
{
"43"
,
"c3"
}
special
[
"<f10>"
]
=
[]
string
{
"ff"
,
"c7"
}
special
[
"<f10>"
]
=
[]
string
{
"44"
,
"c4"
}
special
[
"<f11>"
]
=
[]
string
{
"ff"
,
"c8"
}
special
[
"<f12>"
]
=
[]
string
{
"ff"
,
"c9"
}
special
[
"<return>"
]
=
[]
string
{
"1c"
,
"9c"
}
special
[
"<return>"
]
=
[]
string
{
"1c"
,
"9c"
}
special
[
"<tab>"
]
=
[]
string
{
"0f"
,
"8f"
}
special
[
"<tab>"
]
=
[]
string
{
"0f"
,
"8f"
}
shiftedChars
:=
"~!@#$%^&*()_+{}|:
\"
<>?"
shiftedChars
:=
"~!@#$%^&*()_+{}|:
\"
<>?"
// Scancodes reference: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
scancodeIndex
:=
make
(
map
[
string
]
uint
)
scancodeIndex
:=
make
(
map
[
string
]
uint
)
scancodeIndex
[
"1234567890-="
]
=
0x02
scancodeIndex
[
"1234567890-="
]
=
0x02
scancodeIndex
[
"!@#$%^&*()_+"
]
=
0x02
scancodeIndex
[
"!@#$%^&*()_+"
]
=
0x02
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment