diff --git a/cmd/evlist/main.go b/cmd/evlist/main.go new file mode 100644 index 0000000..568ce87 --- /dev/null +++ b/cmd/evlist/main.go @@ -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) + } +} diff --git a/internal/config/configparser.go b/internal/config/configparser.go index 43caeeb..ae464d8 100644 --- a/internal/config/configparser.go +++ b/internal/config/configparser.go @@ -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 }