better log message

This commit is contained in:
Matthew Hooker 2018-04-19 16:09:38 -07:00
parent 31d04f1945
commit 374d8f089f
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 2 additions and 4 deletions

View File

@ -130,7 +130,6 @@ func (d *pcXTDriver) Finalize() error {
} }
func (d *pcXTDriver) SendKey(key rune, action KeyAction) error { func (d *pcXTDriver) SendKey(key rune, action KeyAction) error {
keyShift := unicode.IsUpper(key) || strings.ContainsRune(shiftedChars, key) keyShift := unicode.IsUpper(key) || strings.ContainsRune(shiftedChars, key)
var scancode []string var scancode []string
@ -151,9 +150,8 @@ func (d *pcXTDriver) SendKey(key rune, action KeyAction) error {
scancode = append(scancode, fmt.Sprintf("%02x", scancodeInt)) scancode = append(scancode, fmt.Sprintf("%02x", scancodeInt))
} }
for _, sc := range scancode { log.Printf("Sending char '%c', code '%s', shift %v",
log.Printf("Sending char '%c', code '%s', shift %v", key, sc, keyShift) key, strings.Join(scancode, ""), keyShift)
}
d.send(scancode) d.send(scancode)
return nil return nil