//go:build !linux package usb import ( "fmt" ) // Keyboard represents an input device (keyboard). // Non-Linux stub. type Keyboard struct{} // OpenFirstKeyboard opens the first available keyboard device. // On non-Linux platforms, it always returns an error. func OpenFirstKeyboard() (*Keyboard, error) { return nil, fmt.Errorf("usb keyboard input is only supported on Linux") } // Close releases the keyboard device. func (kb *Keyboard) Close() error { return nil } // ReadKey reads the next key event from the keyboard. func (kb *Keyboard) ReadKey() (*Key, error) { return nil, fmt.Errorf("usb keyboard input is only supported on Linux") } // GetDeviceInfo returns information about the connected keyboard. func (kb *Keyboard) GetDeviceInfo() string { return "linux-only" }