|
@@ -18,7 +18,8 @@ type Device struct {
|
|
|
const Directory = "/dev/input"
|
|
|
|
|
|
func Open(name string) (*Device, error) {
|
|
|
- f, err := os.OpenFile(filepath.Join(Directory, name), os.O_RDWR, 0666)
|
|
|
+ f, err := os.OpenFile(filepath.Join(Directory, name),
|
|
|
+ syscall.O_ASYNC|syscall.O_NONBLOCK|os.O_RDWR, 0666)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|