From 8e3d42b2e651584751f2840507ef68575b972f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= Date: Mon, 3 Jan 2022 23:04:01 +0100 Subject: [PATCH] apple: m1: map numeric keys to function keys machines with touchbar don't have function keys so this is hack to emulate them with Fn key + numeric keys, and F11 with Fn + -, and F12 with Fn + = --- drivers/hid/hid-apple.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 8b78bb3e75b0..21db2452047c 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -116,6 +116,18 @@ static const struct apple_key_translation apple_fn_keys[] = { { KEY_DOWN, KEY_PAGEDOWN }, { KEY_LEFT, KEY_HOME }, { KEY_RIGHT, KEY_END }, + { KEY_1, KEY_F1 }, + { KEY_2, KEY_F2 }, + { KEY_3, KEY_F3 }, + { KEY_4, KEY_F4 }, + { KEY_5, KEY_F5 }, + { KEY_6, KEY_F6 }, + { KEY_7, KEY_F7 }, + { KEY_8, KEY_F8 }, + { KEY_9, KEY_F9 }, + { KEY_0, KEY_F10 }, + { KEY_MINUS, KEY_F11 }, + { KEY_EQUAL, KEY_F12 }, { } }; -- 2.34.1