From patchwork Fri Mar 25 13:40:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 662261 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 p2PDf4pa019294 for ; Fri, 25 Mar 2011 13:41:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670Ab1CYNkr (ORCPT ); Fri, 25 Mar 2011 09:40:47 -0400 Received: from adelie.canonical.com ([91.189.90.139]:56206 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753178Ab1CYNkM (ORCPT ); Fri, 25 Mar 2011 09:40:12 -0400 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q37FL-00014S-AD; Fri, 25 Mar 2011 13:40:11 +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 1Q37FL-00063B-11; Fri, 25 Mar 2011 13:40:11 +0000 From: Seth Forshee To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] Input: sparse-keymap - report scancodes with key events Date: Fri, 25 Mar 2011 08:40:02 -0500 Message-Id: <1301060403-19229-2-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1301060403-19229-1-git-send-email-seth.forshee@canonical.com> References: <20110325073554.GD2590@core.coreip.homeip.net> <1301060403-19229-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]); Fri, 25 Mar 2011 13:41:05 +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) {