Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bootcommand/usb_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func NewUSBDriver(send SendUsbScanCodes, interval time.Duration) *usbDriver {
"insert": key.CodeInsert,
"home": key.CodeHome,
"end": key.CodeEnd,
"pageUp": key.CodePageUp,
"pageDown": key.CodePageDown,
Copy link
Copy Markdown
Contributor

@azr azr Mar 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean that pageUp will stop working ? and only pageup will ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They never worked. The keystrokes are lowercased before matching the map. All of the others are lowercased I don't know why I added these two camel-cased in the first place. 🤔

"pageup": key.CodePageUp,
"pagedown": key.CodePageDown,
"left": key.CodeLeftArrow,
"right": key.CodeRightArrow,
"up": key.CodeUpArrow,
Expand Down
10 changes: 10 additions & 0 deletions bootcommand/usb_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ func TestUSBDriver(t *testing.T) {
key.CodeLeftShift,
false,
},
{
"<pageUp>",
key.CodePageUp,
false,
},
{
"<pageDown>",
key.CodePageDown,
false,
},
{
"<leftShiftOff>",
key.CodeLeftShift,
Expand Down