Thread (2 messages) 2 messages, 2 authors, 2020-12-08

Re: [PATCH] Input: cros_ec_keyb - send 'scancodes' in addition to key events

From: Rajat Jain <hidden>
Date: 2020-12-08 02:32:27

On Mon, Dec 7, 2020 at 5:43 PM Dmitry Torokhov
[off-list ref] wrote:
To let userspace know what 'scancodes' should be used in EVIOCGKEYCODE
and EVIOCSKEYCODE ioctls, we should send EV_MSC/MSC_SCAN events in
addition to EV_KEY/KEY_* events. The driver already declared MSC_SCAN
capability, so it is only matter of actually sending the events.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
FWIW, Acked-by: Rajat Jain [off-list ref]

quoted hunk ↗ jump to hunk
---
 drivers/input/keyboard/cros_ec_keyb.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 023f083dadd3..354d74d62f05 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -184,6 +184,7 @@ static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
                                        "changed: [r%d c%d]: byte %02x\n",
                                        row, col, new_state);

+                               input_event(idev, EV_MSC, MSC_SCAN, pos);
                                input_report_key(idev, keycodes[pos],
                                                 new_state);
                        }
--
2.29.2.576.ga3fc446d84-goog


--
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help