Re: [PATCH] Input: atkbd - rate-limit unknown key warnings

From: Dmitry Torokhov

Date: Mon Sep 21 2026 - 12:55:03 EST


Hi Zhang,

On Mon, Sep 21, 2026 at 09:19:34PM +0800, Zhang Heng wrote:
> Replace dev_warn() with dev_warn_ratelimited() for unmapped scancode
> warnings, matching the existing rate-limited handling of spurious
> ACK/NAK events in the same function.

I do not think this is needed. Unlike spurious NAK/ACKs pressing keys
are initiated by a person and events are naturally rate-limited.

The solution is to indeed map the key to do nothing:

KEYBOARD_KEY_xx=unknown

Userspace ignores KEY_UNKNOWN events and there are no dmesg logs either.

Thanks.

--
Dmitry