From mboxrd@z Thu Jan 1 00:00:00 1970 From: roel kluin Subject: Re: HID: is scancode correctly reported after key status change in hidinput_hid_event()? Date: Sat, 9 Jan 2010 19:51:21 +0100 Message-ID: <25e057c01001091051q7c09ed40u6a860adee6a750d4@mail.gmail.com> References: <4B489B44.50101@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-bw0-f227.google.com ([209.85.218.227]:35518 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841Ab0AISvn convert rfc822-to-8bit (ORCPT ); Sat, 9 Jan 2010 13:51:43 -0500 In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Jiri Kosina Cc: linux-input@vger.kernel.org, LKML On Sat, Jan 9, 2010 at 4:15 PM, Jiri Kosina wrote: > On Sat, 9 Jan 2010, Roel Kluin wrote: > >> vi drivers/hid/hid-input.c +634 and not in hidinput_hid_event() >> >> =C2=A0 =C2=A0 =C2=A0 /* report the usage code as scancode if the key= status has changed */ >> =C2=A0 =C2=A0 =C2=A0 if (usage->type =3D=3D EV_KEY && !!test_bit(usa= ge->code, input->key) !=3D value) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 input_event(input, = EV_MSC, MSC_SCAN, usage->hid); >> >> Only if value is 1 or 0 the input_event() can occur, but value doesn= 't >> seem to be intended to be used as a boolean. are we really doing the >> correct test here? > > Hi Roel, > > well, value 2 means 'repeated' key, and there is no other possibility= for > EV_KEY value than 0,1,2. > > For EV_KEY events generated by HID devices, the autorepeat is done by > input core (as the device sends the report only when status is change= d), > so there is no easy way how to inject EV_MSC into the 'autorepeat rep= orts' > anyway. > > Are you hitting some bug because of this, or have you found this out > solely by code reading? only code reading. Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-input" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html