Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932265AbZJaLEi (ORCPT ); Sat, 31 Oct 2009 07:04:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757157AbZJaLEh (ORCPT ); Sat, 31 Oct 2009 07:04:37 -0400 Received: from nn7.de ([85.214.94.156]:46199 "EHLO nn7.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757031AbZJaLEh (ORCPT ); Sat, 31 Oct 2009 07:04:37 -0400 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Sat, 31 Oct 2009 07:04:36 EDT Subject: [PATCH] mouse button #1 emulation for mac_hid From: Soeren Sonnenburg To: Linux Kernel Content-Type: multipart/mixed; boundary="=-TGjpDj1vtaR6MqEe307E" Date: Sat, 31 Oct 2009 11:57:58 +0100 Message-ID: <1256986678.18934.13.camel@no> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5632 Lines: 92 --=-TGjpDj1vtaR6MqEe307E Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Dear all, I am not sure what the future of mac_hid is (the source says will be removed, but since 9 years). In case it stays in kernel the attached patch adds support for mouse button 1 emulation. If this driver stays in the kernel I would also suggest to rename it - it is not mac specific (I am using this on a netbook). Rationale? Broken touchpads, within linux unsupported (multi-)touch pads where click and hold + moving the mouse does not work. Soeren --=20 For the one fact about the future of which we can be certain is that it will be utterly fantastic. -- Arthur C. Clarke, 1962 --=-TGjpDj1vtaR6MqEe307E Content-Disposition: attachment; filename="mac_hid_lmb.diff" Content-Type: text/x-patch; name="mac_hid_lmb.diff"; charset="ISO-8859-15" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWFjaW50b3NoL21hY19oaWQuYyBiL2RyaXZlcnMvbWFjaW50 b3NoL21hY19oaWQuYw0K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qEe307E-- -- 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/