Input: cros_ec_keyb - send 'scancodes' in addition to key events
Subsystems (3)
Dmitry Torokhov
maintainerPATCH 1/1 Input: cros_ec_keyb - send 'scancodes' in addition to key events
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 <[email protected]>
--- drivers/input/keyboard/cros_ec_keyb.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/keyboard/cros_ec_keyb.c +1 -0
@@ -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); }
Signature · 5 lines
2.29.2.576.ga3fc446d84-goog -- Dmitry
Quoted 7 lines · Dmitry Torokhov
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_SCANcapability, so it is only matter of actually sending the events.Signed-off-by Dmitry Torokhov <[email protected]>
FWIW, Acked-by: Rajat Jain <[email protected]>
Quoted 22 lines
--- drivers/input/keyboard/cros_ec_keyb.c | 1 + 1 file changed, 1 insertion(+)drivers/input/keyboard/cros_ec_keyb.c +1
-1@@ -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