From patchwork Sat Apr 23 02:14:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerone Young X-Patchwork-Id: 728861 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 p3N2F0Jj015533 for ; Sat, 23 Apr 2011 02:15:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757143Ab1DWCOx (ORCPT ); Fri, 22 Apr 2011 22:14:53 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:55722 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757074Ab1DWCOx (ORCPT ); Fri, 22 Apr 2011 22:14:53 -0400 Received: by yia27 with SMTP id 27so263879yia.19 for ; Fri, 22 Apr 2011 19:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=g6YvQ7xTYZwfWlLvkthSiofO5znZuBIbTk48hU07DmE=; b=mGE+L1e1g+fuzmFYHysriKHNFIaKjYqPc0LOYEy4FQABc48lWOP/DHusasKgrz9eof 5BpPqb8+KCTs9EeCHfdDMUcE2E3dY50Y1QJuaYuiM09JT54Nug4KJN1pYExi6X64tJ5G eoqKaUN8fyrvaEuxuf35YOs+nFjWPR3emcuj0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=jaizyfEK2SufeNA0ky8cBAvXzvyXYVDwGtL9UKcwSyUQjjvEiZhF/ClsnZjlkxv487 tJya7/sOwWXG+0MoTjCF13VvGCMrRNPgH8g6nYqint38A7G1uqbXU5aGcbNSvzZ94MYK ozAyaLu5qQ/h7AP+kJCfLH6k83LjEyTvoxhTY= Received: by 10.91.5.5 with SMTP id h5mr1332341agi.110.1303524892043; Fri, 22 Apr 2011 19:14:52 -0700 (PDT) Received: from [192.168.1.8] (adsl-71-145-134-126.dsl.austtx.sbcglobal.net [71.145.134.126]) by mx.google.com with ESMTPS id j3sm1055092anm.9.2011.04.22.19.14.50 (version=SSLv3 cipher=OTHER); Fri, 22 Apr 2011 19:14:51 -0700 (PDT) Subject: [PATCH] Add keycode for microphone mute key From: Jerone Young To: linux-input@vger.kernel.org Cc: Herton Ronaldo Krzesinski Date: Fri, 22 Apr 2011 21:14:49 -0500 Message-ID: <1303524889.2457.24.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 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]); Sat, 23 Apr 2011 02:15:18 +0000 (UTC) Lenovo is now including a key for muting the microphone on all Thinkpad models & peripheral keyboards. Currently there is no way to deal with this key being handled in a common fashion under Linux. This patch defines a key code for microphone mute so that this key can be mapped for Thinkpad models & peripheral keyboards. By having a set keycode this key can be remapped to the common keycode and userspace can then listen and take some action once the key is pressed. A common action would be to mute the microphone mixer. Thinkpad keyboard pic: http://bit.ly/hLxXL1 Thinkpad usb keyboard pic: http://bit.ly/gfNaQz Signed-off-by: Jerone Young --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/input.h b/include/linux/input.h index 771d6d8..4d8a8ae 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -673,6 +673,8 @@ struct input_keymap_entry { #define KEY_CAMERA_LEFT 0x219 #define KEY_CAMERA_RIGHT 0x21a +#define KEY_MICROPHONE_MUTE 0x21b /* microphone mute key */ + #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0 #define BTN_TRIGGER_HAPPY2 0x2c1