Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752387AbWKGIPt (ORCPT ); Tue, 7 Nov 2006 03:15:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754090AbWKGIPt (ORCPT ); Tue, 7 Nov 2006 03:15:49 -0500 Received: from fmx12.freemail.hu ([195.228.245.62]:38546 "HELO fmx12.freemail.hu") by vger.kernel.org with SMTP id S1752387AbWKGIPs convert rfc822-to-8bit (ORCPT ); Tue, 7 Nov 2006 03:15:48 -0500 Date: Tue, 7 Nov 2006 09:15:43 +0100 (CET) From: =?ISO-8859-2?Q?N=E9meth_M=E1rton?= Subject: Re: [PATCH] input: map BTN_FORWARD to button 2 in mousedev To: Dmitry Torokhov cc: linux-input@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org In-Reply-To: Message-ID: X-Originating-IP: [80.98.105.91] X-HTTP-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Content-Transfer-Encoding: 8BIT X-Freemail: message scanned Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2671 Lines: 65 Dmitry Torokhov wrote: > On 11/5/06, N?meth M?rton wrote: > > From: M?rton N?meth > > > > In mousedev the BTN_LEFT and BTN_FORWARD were mapped to mouse button 0, causing > > that the user space program cannot distinguish between them through /dev/input/mice. > > The BTN_FORWARD is currently used in the synaptics.c, logips2pp.c and in alps.c. All > > mice have BTN_LEFT, but not all have BTN_MIDDLE (e.g. Clevo D410J laptop). Mapping > > BTN_FORWARD to mouse button 2 makes the BTN_FORWARD button useful on the mentioned > > laptop. > > > > I'd rather not touch mappings in legacy mousedev driver. I believe > both synaptics and evdev X drivers will correctly recognize > BTN_FORWARD, is there any reason you are not using them? If I have understand the input subsystem correctly, for the evdev X driver the mousedev.c is not needed, so using an evdev X driver is a completely other story. This map change could result that the BTN_FORWARD can be used as BTN_MIDDLE out of the box, without any additional drivers, so it is simpler (at least in case of Clevo D410J). My patch is based on the assumption that every mouse has BTN_LEFT, so it is not worth having two mouse buttons for the same function. (For Clevo D410J it is actually an information loss at this point.) Next thing is that the BTN_FORWARD and BTN_BACK usually comes together. The BTN_LEFT and BTN_RIGHT usually comes together also. For the mapping I see some possible mapping listed in the following table: Button name | (a) | (b) | (c) | ---------------+-------------+-------------+-------------+ BTN_LEFT | 0 | 0 | 0 | BTN_RIGHT | 1 | 1 | 1 | BTN_FORWARD | 0 | 2 | 0 | BTN_BACK | 1 | 3 | 3 | Mapping (a) would map BTN_FORWARD and BTN_BACK to BTN_LEFT and BTN_RIGHT. Mapping (b) would map all 4 buttons to different buttons. Mapping (c) is the current mapping where the BTN_FORWARD is handled differently than BTN_BACK. NMarci ___________________________________________________________________________ Kar?csonyi sorban ?ll?s helyett v?s?roljon k?nyelmesen! Garant?ltan 1 nap alatt sz?ll?tjuk a megrendelt k?nyveket! http://www.bookline.hu/control/news?newsid=528&affiliate=frenapkar3171 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/