All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: thinkpad-acpi: Add support for new hotkey for camera shutter switch
@ 2025-04-03  5:31 Nitin Joshi
  2025-04-03 10:34 ` Hans de Goede
  0 siblings, 1 reply; 10+ messages in thread
From: Nitin Joshi @ 2025-04-03  5:31 UTC (permalink / raw)
  To: ilpo.jarvinen, hdegoede
  Cc: platform-driver-x86, ibm-acpi-devel, njoshi1, mpearson-lenovo,
	Nitin Joshi

New Lenovo Thinkpad models, e.g. the 'X9-14 Gen 1' and 'X9-15 Gen 1'
has new shortcut on F9 key i.e to switch camera shutter and it
send a new 0x131b hkey event when F9 key is pressed.

This commit adds support for new hkey 0x131b.
Signed-off-by: Nitin Joshi <nitjoshi@gmail.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 0384cf311878..80f77f9c7a58 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -182,6 +182,7 @@ enum tpacpi_hkey_event_t {
 						   * directly in the sparse-keymap.
 						   */
 	TP_HKEY_EV_AMT_TOGGLE		= 0x131a, /* Toggle AMT on/off */
+	TP_HKEY_EV_CAMERASHUTTER_TOGGLE = 0x131b, /* Toggle Camera Shutter */
 	TP_HKEY_EV_DOUBLETAP_TOGGLE	= 0x131c, /* Toggle trackpoint doubletap on/off */
 	TP_HKEY_EV_PROFILE_TOGGLE	= 0x131f, /* Toggle platform profile in 2024 systems */
 	TP_HKEY_EV_PROFILE_TOGGLE2	= 0x1401, /* Toggle platform profile in 2025 + systems */
@@ -3271,6 +3272,7 @@ static const struct key_entry keymap_lenovo[] __initconst = {
 	 * after switching to sparse keymap support. The mappings above use translated
 	 * scancodes to preserve uAPI compatibility, see tpacpi_input_send_key().
 	 */
+	{ KE_KEY, TP_HKEY_EV_CAMERASHUTTER_TOGGLE, { KEY_CAMERA_ACCESS_TOGGLE } },
 	{ KE_KEY, 0x131d, { KEY_VENDOR } }, /* System debug info, similar to old ThinkPad key */
 	{ KE_KEY, 0x1320, { KEY_LINK_PHONE } },
 	{ KE_KEY, TP_HKEY_EV_TRACK_DOUBLETAP /* 0x8036 */, { KEY_PROG4 } },
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-04-22  0:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03  5:31 [PATCH] platform/x86: thinkpad-acpi: Add support for new hotkey for camera shutter switch Nitin Joshi
2025-04-03 10:34 ` Hans de Goede
2025-04-04  6:44   ` Nitin Joshi
2025-04-04  7:25     ` Hans de Goede
2025-04-04  9:02       ` Nitin Joshi
2025-04-04 19:23         ` Mark Pearson
2025-04-07  3:27           ` Nitin Joshi
2025-04-07 13:24             ` Hans de Goede
2025-04-11  9:02               ` Nitin Joshi
2025-04-22  0:50               ` Nitin Joshi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.