Skip to content

Commit

Permalink
fix the KeyUp fun
Browse files Browse the repository at this point in the history
the function KeyUp won't work due to the error state value.Fixed it by replacing it with "btnStateReleased".
  • Loading branch information
Sleeplessy authored Nov 9, 2017
1 parent 050ec52 commit 2625134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uinput.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func (vk vKeyboard) KeyDown(key int) error {
// cases it is recommended to call this function immediately after the "KeyDown" function in order to only issue a
// single key press.
func (vk vKeyboard) KeyUp(key int) error {
err := sendBtnEvent(vk.deviceFile, key, btnStatePressed)
err := sendBtnEvent(vk.deviceFile, key, btnStateReleased)
if err != nil {
return fmt.Errorf("Failed to issue the KeyUp event: %v", err)
}
Expand Down

0 comments on commit 2625134

Please sign in to comment.