From 1baf81abd12a6bd7e46f8c3def825e7038b1c24c Mon Sep 17 00:00:00 2001 From: deads2k Date: Fri, 28 Apr 2017 08:49:31 -0400 Subject: [PATCH] UPSTREAM: docker/docker: : WORD/DWORD changed --- .../docker/docker/pkg/term/windows/ansi_reader.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go b/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go index 5b91b78342b1..3bf2b2b6b46b 100644 --- a/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go +++ b/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go @@ -136,14 +136,14 @@ func readInputEvents(fd uintptr, maxBytes int) ([]winterm.INPUT_RECORD, error) { // KeyEvent Translation Helpers -var arrowKeyMapPrefix = map[uint16]string{ +var arrowKeyMapPrefix = map[winterm.WORD]string{ winterm.VK_UP: "%s%sA", winterm.VK_DOWN: "%s%sB", winterm.VK_RIGHT: "%s%sC", winterm.VK_LEFT: "%s%sD", } -var keyMapPrefix = map[uint16]string{ +var keyMapPrefix = map[winterm.WORD]string{ winterm.VK_UP: "\x1B[%sA", winterm.VK_DOWN: "\x1B[%sB", winterm.VK_RIGHT: "\x1B[%sC", @@ -207,7 +207,7 @@ func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) stri } // formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. -func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) string { +func formatVirtualKey(key winterm.WORD, controlState winterm.DWORD, escapeSequence []byte) string { shift, alt, control := getControlKeys(controlState) modifier := getControlKeysModifier(shift, alt, control) @@ -223,7 +223,7 @@ func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) st } // getControlKeys extracts the shift, alt, and ctrl key states. -func getControlKeys(controlState uint32) (shift, alt, control bool) { +func getControlKeys(controlState winterm.DWORD) (shift, alt, control bool) { shift = 0 != (controlState & winterm.SHIFT_PRESSED) alt = 0 != (controlState & (winterm.LEFT_ALT_PRESSED | winterm.RIGHT_ALT_PRESSED)) control = 0 != (controlState & (winterm.LEFT_CTRL_PRESSED | winterm.RIGHT_CTRL_PRESSED))