From patchwork Thu Sep 10 17:21:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 46630 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8AHMBqr016790 for ; Thu, 10 Sep 2009 17:22:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752834AbZIJRWF (ORCPT ); Thu, 10 Sep 2009 13:22:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752305AbZIJRWF (ORCPT ); Thu, 10 Sep 2009 13:22:05 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:39051 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbZIJRWD (ORCPT ); Thu, 10 Sep 2009 13:22:03 -0400 Received: from apoitiers-258-1-110-34.w90-50.abo.wanadoo.fr ([90.50.109.34] helo=localhost.localdomain) by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MlnLN-0002AO-CZ; Thu, 10 Sep 2009 18:22:01 +0100 From: Matthew Garrett To: linux-input@vger.kernel.org Cc: linux-wireless@vger.kernel.org, marcel@holtmann.org, Matthew Garrett Subject: [PATCH 1/2] input: Add KEY_RFKILL Date: Thu, 10 Sep 2009 18:21:31 +0100 Message-Id: <1252603292-20830-1-git-send-email-mjg@redhat.com> X-Mailer: git-send-email 1.6.2.5 X-cavan-blacklisted-at: zen.spamhaus.org X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 90.50.109.34 X-SA-Exim-Mail-From: mjg@redhat.com X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Most laptops have keys that are intended to toggle all device state, not just wifi. These are currently generally mapped to KEY_WLAN. As a result, rfkill will only kill or enable wifi in response to the key press. This confuses users and can make it difficult for them to enable bluetooth and wwan devices. This patch adds a new keycode, KEY_RFKILL_ALL. It indicates that the system should toggle the state of all rfkillable devices. Signed-off-by: Matthew Garrett Acked-by: Dmitry Torokhov --- include/linux/input.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/input.h b/include/linux/input.h index 8b3bc3e..20a622e 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -595,6 +595,8 @@ struct input_absinfo { #define KEY_NUMERIC_STAR 0x20a #define KEY_NUMERIC_POUND 0x20b +#define KEY_RFKILL 0x20c /* Key that controls all radios */ + /* We avoid low common keys in module aliases so they don't get huge. */ #define KEY_MIN_INTERESTING KEY_MUTE #define KEY_MAX 0x2ff