diff --git a/jsonrpc.go b/jsonrpc.go index 7b2d0a25..4dd6a4a8 100644 --- a/jsonrpc.go +++ b/jsonrpc.go @@ -1139,7 +1139,10 @@ func rpcDoExecuteKeyboardMacro(ctx context.Context, macro []hidrpc.KeyboardMacro // Sleep completed normally case <-ctx.Done(): // make sure keyboard state is reset - rpcKeyboardReport(0, keyboardClearStateKeys) + _, err := rpcKeyboardReport(0, keyboardClearStateKeys) + if err != nil { + logger.Warn().Err(err).Msg("failed to reset keyboard state") + } gadget.UpdateKeysDown(0, keyboardClearStateKeys) logger.Debug().Int("step", i).Msg("Keyboard macro cancelled during sleep")