// Testing for support of specific axes can be // done with the `dev.Supports()` method. func relAxes(dev *evdev.Device) { axes := dev.RelativeAxes() for n := 0; n < axes.Len(); n++ { if !axes.Test(n) { continue } fmt.Printf(" Relative axis 0x%02x ", n) switch n { case evdev.RelX: fmt.Printf("X Axis: ") case evdev.RelY: fmt.Printf("Y Axis: ") case evdev.RelZ: fmt.Printf("Z Axis: ") default: // More axes types... fmt.Printf("Other axis\n") } fmt.Println() } }