From patchwork Wed Mar 23 21:13:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 657121 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2NLHqdZ029076 for ; Wed, 23 Mar 2011 21:17:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933303Ab1CWVRY (ORCPT ); Wed, 23 Mar 2011 17:17:24 -0400 Received: from adelie.canonical.com ([91.189.90.139]:48520 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755141Ab1CWVRX (ORCPT ); Wed, 23 Mar 2011 17:17:23 -0400 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q2VQg-0000pJ-Ae; Wed, 23 Mar 2011 21:17:22 +0000 Received: from c-69-254-227-224.hsd1.ks.comcast.net ([69.254.227.224] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Q2VNh-0007wR-CQ; Wed, 23 Mar 2011 21:14:17 +0000 From: Seth Forshee To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] Input: sparse-keymap - report scancodes with key events Date: Wed, 23 Mar 2011 16:13:42 -0500 Message-Id: <1300914823-9440-2-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300914823-9440-1-git-send-email-seth.forshee@canonical.com> References: <1300914823-9440-1-git-send-email-seth.forshee@canonical.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 23 Mar 2011 21:17:52 +0000 (UTC) diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index 337bf51..74bca5d 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c @@ -208,6 +208,11 @@ int sparse_keymap_setup(struct input_dev *dev, } } + if (test_bit(EV_KEY, dev->evbit)) { + __set_bit(EV_MSC, dev->evbit); + __set_bit(MSC_SCAN, dev->mscbit); + } + dev->keycode = map; dev->keycodemax = map_size; dev->getkeycode = sparse_keymap_getkeycode; @@ -268,6 +273,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k { switch (ke->type) { case KE_KEY: + input_event(dev, EV_MSC, MSC_SCAN, ke->code); input_report_key(dev, ke->keycode, value); input_sync(dev); if (value && autorelease) {