Add an 'evlist' command to help get the exact strings for device names.
This commit is contained in:
parent
a18275f53b
commit
50474f9fb2
2 changed files with 18 additions and 1 deletions
17
cmd/evlist/main.go
Normal file
17
cmd/evlist/main.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.annabunches.net/annabunches/joyful/internal/logger"
|
||||
"github.com/holoplot/go-evdev"
|
||||
)
|
||||
|
||||
func main() {
|
||||
devices, err := evdev.ListDevicePaths()
|
||||
logger.FatalIfError(err, "")
|
||||
|
||||
for _, device := range devices {
|
||||
fmt.Printf("%s: '%s'\n", device.Path, device.Name)
|
||||
}
|
||||
}
|
|
@ -118,7 +118,7 @@ func (parser *ConfigParser) ConnectPhysicalDevices() map[string]*evdev.InputDevi
|
|||
|
||||
device, err := evdev.OpenByName(deviceConfig.DeviceName)
|
||||
if err != nil {
|
||||
logger.LogError(err, "Failed to open physical device, skipping. Confirm the device name with 'evtest'")
|
||||
logger.LogError(err, "Failed to open physical device, skipping. Confirm the device name with 'evlist'. Watch out for spaces.")
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue