From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marvin Raaijmakers Subject: Re: [PATCH] input: change SysRq keycode for systems without SysRq key Date: Fri, 17 Aug 2007 16:35:18 +0200 Message-ID: <1187361318.3684.30.camel@localhost.localdomain> References: <469C647B.1000307@inwind.it> <469E7E29.2050206@inwind.it> <469FDA19.6020702@inwind.it> <469FF3D9.4080307@inwind.it> <20070802212730.GA10153@suse.cz> <1187339112.3684.10.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7BIT Return-path: In-reply-to: Sender: owner-linux-input@atrey.karlin.mff.cuni.cz List-Help: List-Owner: List-Post: List-Unsubscribe: To: Jiri Kosina Cc: Vojtech Pavlik , federico ferri , Dmitry Torokhov , linux-input@atrey.karlin.mff.cuni.cz, mzxrlshmm@0pointer.de List-Id: linux-input@vger.kernel.org This code doesn't filter out the "status events" right? So that still needs to be done(?). - Marvin On Fri, 2007-08-17 at 12:22 +0200, Jiri Kosina wrote: > (CCs trimmed a little bit) > > On Fri, 17 Aug 2007, Marvin Raaijmakers wrote: > > > What's the current state of this patch? > > Hi Marvin, > > does the patch below establish the functionality you are looking for? > Please note that we do the reporting only for such usages that have the > type of EV_KEY. > > > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c > index 8edbd30..7f4731b 100644 > --- a/drivers/hid/hid-input.c > +++ b/drivers/hid/hid-input.c > @@ -888,6 +888,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel > set_bit(KEY_VOLUMEDOWN, input->keybit); > } > > + if (usage->type == EV_KEY) { > + set_bit(EV_MSC, input->evbit); > + set_bit(MSC_SCAN, input->mscbit); > + } > + > hid_resolv_event(usage->type, usage->code); > > dbg_hid_line("\n"); > @@ -991,6 +996,9 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct > return; > } > > + if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value) > + input_event(input, EV_MSC, MSC_SCAN, usage->hid); > + > input_event(input, usage->type, usage->code, value); > > if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY)) >