fix: jsonrpc.go:1142:21: Error return value is not checked (errcheck)

This commit is contained in:
Siyuan Miao 2025-09-11 02:16:45 +02:00
parent 137d22b0b3
commit a86b516f9a
1 changed files with 4 additions and 1 deletions

View File

@ -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")