Skip to content

Commit

Permalink
Use keyed fields in struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Dahlmanns committed Feb 21, 2017
1 parent 5fea067 commit 3aa5b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uinputwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func createUsbDevice(deviceFile *os.File, dev uinputUserDev) (fd *os.File, err e

func sendBtnEvent(deviceFile *os.File, key int, btnState int) (err error) {
buf, err := inputEventToBuffer(inputEvent{
Time: syscall.Timeval{0, 0},
Time: syscall.Timeval{Sec: 0, Usec: 0},
Type: evKey,
Code: uint16(key),
Value: int32(btnState)})
Expand All @@ -233,7 +233,7 @@ func sendBtnEvent(deviceFile *os.File, key int, btnState int) (err error) {

func sendRelEvent(deviceFile *os.File, eventCode uint16, pixel int32) error {
iev := inputEvent{
Time: syscall.Timeval{0, 0},
Time: syscall.Timeval{Sec: 0, Usec: 0},
Type: evRel,
Code: eventCode,
Value: pixel}
Expand All @@ -253,7 +253,7 @@ func sendRelEvent(deviceFile *os.File, eventCode uint16, pixel int32) error {

func syncEvents(deviceFile *os.File) (err error) {
buf, err := inputEventToBuffer(inputEvent{
Time: syscall.Timeval{0, 0},
Time: syscall.Timeval{Sec: 0, Usec: 0},
Type: evSyn,
Code: 0,
Value: int32(synReport)})
Expand Down

0 comments on commit 3aa5b9e

Please sign in to comment.