Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2810841pxb; Sun, 20 Feb 2022 01:05:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrU7JenZia+I76/f+H1Z/Ej8vPDToCTVQh9kKdvy3U/ZjFZq49TyhEQDt+PUVT1s22sw8K X-Received: by 2002:a17:906:f989:b0:6ce:40f:3c0e with SMTP id li9-20020a170906f98900b006ce040f3c0emr12099331ejb.340.1645347917814; Sun, 20 Feb 2022 01:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645347917; cv=none; d=google.com; s=arc-20160816; b=lPc3px8GSH5JFMrX0KF4gMOykv4JuuvjwQDFsmWNSyjk/BL2c0Omn8q5UpAf4+OyTu 5ExG8kHaltVDRw0iLvPkWTyoRfoQl22diJL9XerC6AGcBzeMD3AZzW0Mv1/gQO0ys8O7 C0XZ0z/Z1SC3dSUKO19OY/2BqoMm/VGWbpxCygpq5RpNp+VIR87H6c+YuuknK7eyFsqe jICv/p0JysWy5Rwumnl0RyN6obINyuQC04TbNjZDprzq/73q7Mu6CYrQao/yKZASlH5C PWexbzSc5F/IccP8rrpAXW4KIVu0/rwbANr8bDLIwVxC16/ZkpVb4TH5B4WpycDNUMLY 6shA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sZLwKSjEy/ME5rayoc52rgW3ddgP7xtdGaSWqAl+rBU=; b=uGG+dqpvPC5SLwdeIqSrzg9+rMMnoU+JCrMPzOLq7WEyqXymsxDjVZuuNjMeZ6aQGF sYwPtiVJ1+DTpin/5zUlgq1S4IrMWm47RIDxg6RuZYaamY4j9IsR2MyVYZ5PlyL3el8B WqyQbmsRIHnSBYzi8/liqSqA9Ug/1/iuoS5eX7b5/cfVaMIi9KfxJz03H4BCAK/WMSAh 6EX/hGo03PNWeOeOLrz5dSG6oPUT4xEcmu/gQbdB9BCmIEcfpNuoOawWYQnVy2MXmXTl lkTUUTRBzrku/FmFMdgprHmfOw6qsxPzAoLbWtMliaP23z60JlBU4oK/R9N9L5tmfYCA m+DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mif1AVlo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 23si7435429ejg.688.2022.02.20.01.04.30; Sun, 20 Feb 2022 01:05:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mif1AVlo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240038AbiBRWAx (ORCPT + 99 others); Fri, 18 Feb 2022 17:00:53 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240084AbiBRWAw (ORCPT ); Fri, 18 Feb 2022 17:00:52 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85B0E60DAB for ; Fri, 18 Feb 2022 14:00:34 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id r64-20020a17090a43c600b001b8854e682eso9795017pjg.0 for ; Fri, 18 Feb 2022 14:00:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sZLwKSjEy/ME5rayoc52rgW3ddgP7xtdGaSWqAl+rBU=; b=mif1AVloBIpbkRLpATD7fmfQIw6RGGHSm7NgqeRuknULpZUC8cnrbwYy80zOJwmo8D A+Gql6BmpZzXBwmpltHVxG5cOtfx/wmteLNVBIn7kqgICH3Jgtdb6/t1LVSTlFdxGpdj BfbBxn4t20fhQFB62mmb5dtVE4uhVW2HqGhMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sZLwKSjEy/ME5rayoc52rgW3ddgP7xtdGaSWqAl+rBU=; b=3JJWLzdNjUjS30sLrQ0xSTprbhxXUAGif+832Z3uqZdAK9bwyxmjeFU5nOeLzlVHl7 eeqh3b8tF/beSh9ISz+eZm6G46C0CO1KYbGLlfHoEJs90dU4/GhJ+RGcP5+o4XIvEMkr 5//HxoKMFnaXFFaH9WkpzWvDDEaRw9Np2HdJxOaK7IQHKR6pHzqVYKVxfM6UZBb3XcEg iO2HhG/kl6VFKDuwU4gOpKCbl5AVThpSO1Gxn13DpOIdjjsP/cF/XemESp2K4rJD+VCs MQiOcBNwm8oSz+XJKJwkMHdkNO+RrV31sUsaocFh975yqYHL1MXItnlYipnxoXZtwaiC R/zQ== X-Gm-Message-State: AOAM530DAcPv9OzQWrZj0gny1QtGn6JK/35EF1y41cI+7WYykaPXg2j8 W9v6MzcXvhKvYRnQ/YPGVLP8nNiSU+xJJhdz X-Received: by 2002:a17:902:dacd:b0:14f:4e5d:fe0d with SMTP id q13-20020a170902dacd00b0014f4e5dfe0dmr9162472plx.128.1645221633881; Fri, 18 Feb 2022 14:00:33 -0800 (PST) Received: from wmahon.c.googlers.com.com (218.180.124.34.bc.googleusercontent.com. [34.124.180.218]) by smtp.gmail.com with ESMTPSA id 13sm306494pje.50.2022.02.18.14.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 14:00:33 -0800 (PST) From: William Mahon X-Google-Original-From: William Mahon To: LKML Cc: William Mahon , Benjamin Tissoires , Dmitry Torokhov , Jiri Kosina , linux-input@vger.kernel.org Subject: [PATCH v3] HID: Add mapping for KEY_DICTATE Date: Fri, 18 Feb 2022 21:59:08 +0000 Message-Id: <20220218215531.1.I5dbf50eb1a7a6734ee727bda4a8573358c6d3ec0@changeid> X-Mailer: git-send-email 2.35.1.473.g83b2b277ed-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Numerous keyboards are adding dictate keys which allows for text messages to be dictated by a microphone. This patch adds a new key definition KEY_DICTATE and maps 0x0c/0x0d8 usage code to this new keycode. Additionally hid-debug is adjusted to recognize this new usage code as well. Signed-off-by: William Mahon --- drivers/hid/hid-debug.c | 1 + drivers/hid/hid-input.c | 1 + include/uapi/linux/input-event-codes.h | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 26c31d759914..8aa68416b1d7 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -969,6 +969,7 @@ static const char *keys[KEY_MAX + 1] = { [KEY_ASSISTANT] = "Assistant", [KEY_KBD_LAYOUT_NEXT] = "KbdLayoutNext", [KEY_EMOJI_PICKER] = "EmojiPicker", + [KEY_DICTATE] = "Dictate", [KEY_BRIGHTNESS_MIN] = "BrightnessMin", [KEY_BRIGHTNESS_MAX] = "BrightnessMax", [KEY_BRIGHTNESS_AUTO] = "BrightnessAuto", diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 112901d2d8d2..ce2b75a67cb8 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -992,6 +992,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; case 0x0cf: map_key_clear(KEY_VOICECOMMAND); break; + case 0x0d8: map_key_clear(KEY_DICTATE); break; case 0x0d9: map_key_clear(KEY_EMOJI_PICKER); break; case 0x0e0: map_abs_clear(ABS_VOLUME); break; diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 225ec87d4f22..4db5d41848e4 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -612,6 +612,7 @@ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */ +#define KEY_DICTATE 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ -- 2.35.1.473.g83b2b277ed-goog