adds missing special char to the list
This commit is contained in:
parent
c1c350a657
commit
2d79ab732b
|
@ -36,6 +36,7 @@ func NewUSBDriver(send SendUsbScanCodes, interval time.Duration) *usbDriver {
|
|||
|
||||
special := map[string]key.Code{
|
||||
"enter": key.CodeReturnEnter,
|
||||
"return": key.CodeReturnEnter,
|
||||
"esc": key.CodeEscape,
|
||||
"bs": key.CodeDeleteBackspace,
|
||||
"del": key.CodeDeleteForward,
|
||||
|
@ -67,6 +68,9 @@ func NewUSBDriver(send SendUsbScanCodes, interval time.Duration) *usbDriver {
|
|||
"rightalt": key.CodeRightAlt,
|
||||
"rightctrl": key.CodeRightControl,
|
||||
"rightshift": key.CodeRightShift,
|
||||
"leftsuper": key.CodeLeftGUI,
|
||||
"rightsuper": key.CodeRightGUI,
|
||||
"spacebar": key.CodeSpacebar,
|
||||
}
|
||||
|
||||
scancodeIndex := make(map[string]key.Code)
|
||||
|
|
|
@ -29,6 +29,21 @@ func TestUSBDriver(t *testing.T) {
|
|||
key.CodeLeftShift,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"<leftsuper>",
|
||||
key.CodeLeftGUI,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"<spacebar>",
|
||||
key.CodeSpacebar,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"<return>",
|
||||
key.CodeReturnEnter,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"a",
|
||||
key.CodeA,
|
||||
|
|
Loading…
Reference in New Issue