fix: log warning on keypress report failure

This commit is contained in:
Adam Shiervani 2025-09-16 14:34:43 +02:00 committed by Siyuan Miao
parent 4ad13a5798
commit cc93748d8d
1 changed files with 3 additions and 0 deletions

View File

@ -481,6 +481,9 @@ func (u *UsbGadget) keypressReport(key byte, press bool) (KeysDownState, error)
func (u *UsbGadget) KeypressReport(key byte, press bool) error {
state, err := u.keypressReport(key, press)
if err != nil {
u.log.Warn().Uint8("key", key).Bool("press", press).Msg("failed to report key")
}
isRolledOver := state.Keys[0] == hidErrorRollOver
if isRolledOver {