Skip to content

Commit

Permalink
sort keycode lists
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhooker committed Apr 19, 2018
1 parent ca26e09 commit 4948f10
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
24 changes: 12 additions & 12 deletions common/bootcommand/pc_xt_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func NewPCXTDriver(send SendCodeFunc, chunkSize int) *pcXTDriver {
sMap := make(map[string][]string)
sMap["bs"] = []string{"0e", "8e"}
sMap["del"] = []string{"e053", "e0d3"}
sMap["down"] = []string{"e050", "e0d0"}
sMap["end"] = []string{"e04f", "e0cf"}
sMap["enter"] = []string{"1c", "9c"}
sMap["esc"] = []string{"01", "81"}
sMap["f1"] = []string{"3b", "bb"}
Expand All @@ -58,26 +60,24 @@ func NewPCXTDriver(send SendCodeFunc, chunkSize int) *pcXTDriver {
sMap["f10"] = []string{"44", "c4"}
sMap["f11"] = []string{"57", "d7"}
sMap["f12"] = []string{"58", "d8"}
sMap["return"] = []string{"1c", "9c"}
sMap["tab"] = []string{"0f", "8f"}
sMap["up"] = []string{"e048", "e0c8"}
sMap["down"] = []string{"e050", "e0d0"}
sMap["left"] = []string{"e04b", "e0cb"}
sMap["right"] = []string{"e04d", "e0cd"}
sMap["spacebar"] = []string{"39", "b9"}
sMap["insert"] = []string{"e052", "e0d2"}
sMap["home"] = []string{"e047", "e0c7"}
sMap["end"] = []string{"e04f", "e0cf"}
sMap["pageup"] = []string{"e049", "e0c9"}
sMap["pagedown"] = []string{"e051", "e0d1"}
sMap["insert"] = []string{"e052", "e0d2"}
sMap["left"] = []string{"e04b", "e0cb"}
sMap["leftalt"] = []string{"38", "b8"}
sMap["leftctrl"] = []string{"1d", "9d"}
sMap["leftshift"] = []string{"2a", "aa"}
sMap["leftsuper"] = []string{"e05b", "e0db"}
sMap["pagedown"] = []string{"e051", "e0d1"}
sMap["pageup"] = []string{"e049", "e0c9"}
sMap["return"] = []string{"1c", "9c"}
sMap["right"] = []string{"e04d", "e0cd"}
sMap["rightalt"] = []string{"e038", "e0b8"}
sMap["rightctrl"] = []string{"e01d", "e09d"}
sMap["rightshift"] = []string{"36", "b6"}
sMap["leftsuper"] = []string{"e05b", "e0db"}
sMap["rightsuper"] = []string{"e05c", "e0dc"}
sMap["spacebar"] = []string{"39", "b9"}
sMap["tab"] = []string{"0f", "8f"}
sMap["up"] = []string{"e048", "e0c8"}

scancodeIndex := make(map[string]byte)
scancodeIndex["1234567890-="] = 0x02
Expand Down
22 changes: 11 additions & 11 deletions common/bootcommand/vnc_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func NewVNCDriver(c VNCKeyEvent) *vncDriver {
sMap := make(map[string]uint32)
sMap["bs"] = 0xFF08
sMap["del"] = 0xFFFF
sMap["down"] = 0xFF54
sMap["end"] = 0xFF57
sMap["enter"] = 0xFF0D
sMap["esc"] = 0xFF1B
sMap["f1"] = 0xFFBE
Expand All @@ -51,26 +53,24 @@ func NewVNCDriver(c VNCKeyEvent) *vncDriver {
sMap["f10"] = 0xFFC7
sMap["f11"] = 0xFFC8
sMap["f12"] = 0xFFC9
sMap["return"] = 0xFF0D
sMap["tab"] = 0xFF09
sMap["up"] = 0xFF52
sMap["down"] = 0xFF54
sMap["left"] = 0xFF51
sMap["right"] = 0xFF53
sMap["spacebar"] = 0x020
sMap["insert"] = 0xFF63
sMap["home"] = 0xFF50
sMap["end"] = 0xFF57
sMap["pageup"] = 0xFF55
sMap["pagedown"] = 0xFF56
sMap["insert"] = 0xFF63
sMap["left"] = 0xFF51
sMap["leftalt"] = 0xFFE9
sMap["leftctrl"] = 0xFFE3
sMap["leftshift"] = 0xFFE1
sMap["leftsuper"] = 0xFFEB
sMap["pagedown"] = 0xFF56
sMap["pageup"] = 0xFF55
sMap["return"] = 0xFF0D
sMap["right"] = 0xFF53
sMap["rightalt"] = 0xFFEA
sMap["rightctrl"] = 0xFFE4
sMap["rightshift"] = 0xFFE2
sMap["rightsuper"] = 0xFFEC
sMap["spacebar"] = 0x020
sMap["tab"] = 0xFF09
sMap["up"] = 0xFF52

return &vncDriver{
c: c,
Expand Down

0 comments on commit 4948f10

Please sign in to comment.