diff --git a/1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch b/1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch index c46957b..d583bee 100644 --- a/1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch +++ b/1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch @@ -79,7 +79,7 @@ index 1d825a474..d903c9a26 100644 obj-$(CONFIG_HID_AUREAL) += hid-aureal.o diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c new file mode 100644 -index 000000000..e07d57573 +index 000000000..ecac68fc7 --- /dev/null +++ b/drivers/hid/hid-appletb-kbd.c @@ -0,0 +1,304 @@ @@ -113,12 +113,12 @@ index 000000000..e07d57573 + +#define HID_USAGE_MODE 0x00ff0004 + -+static int appletb_tb_def_mode = APPLETB_KBD_MODE_FN; ++static int appletb_tb_def_mode = APPLETB_KBD_MODE_SPCL; +module_param_named(mode, appletb_tb_def_mode, int, 0444); +MODULE_PARM_DESC(mode, "Default touchbar mode:\n" + " 0 - escape key only\n" -+ " [1] - function-keys only\n" -+ " 2 - special keys only"); ++ " 1 - function-keys\n" ++ " [2] - special keys"); + +struct appletb_kbd { + struct hid_field *mode_field; diff --git a/1017-HID-hid-appletb-kbd-add-support-for-fn-toggle-betwee.patch b/1017-HID-hid-appletb-kbd-add-support-for-fn-toggle-betwee.patch index 3010985..a50fcce 100644 --- a/1017-HID-hid-appletb-kbd-add-support-for-fn-toggle-betwee.patch +++ b/1017-HID-hid-appletb-kbd-add-support-for-fn-toggle-betwee.patch @@ -1,9 +1,5 @@ -From 006a51516285ebaa8333d19fb76efbc81e5cdb3e Mon Sep 17 00:00:00 2001 From: Aditya Garg -Date: Fri, 9 Aug 2024 19:40:53 +0530 -Subject: [PATCH] HID: hid-appletb-kbd: add support for fn toggle between media - and function mode - +HID: hid-appletb-kbd: add support for fn toggle between media and function mode This patch adds support for the switching between the Media and Function keys on the touchbar by pressing the Fn key on Apple Internal Keyboard. @@ -13,7 +9,7 @@ Signed-off-by: Aditya Garg 1 file changed, 128 insertions(+) diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c -index e07d57573..ec8051dcf 100644 +index ecac68fc7..442c4d884 100644 --- a/drivers/hid/hid-appletb-kbd.c +++ b/drivers/hid/hid-appletb-kbd.c @@ -26,6 +26,8 @@ @@ -24,10 +20,10 @@ index e07d57573..ec8051dcf 100644 + #define HID_USAGE_MODE 0x00ff0004 - static int appletb_tb_def_mode = APPLETB_KBD_MODE_FN; + static int appletb_tb_def_mode = APPLETB_KBD_MODE_SPCL; @@ -35,11 +37,18 @@ MODULE_PARM_DESC(mode, "Default touchbar mode:\n" - " [1] - function-keys only\n" - " 2 - special keys only"); + " 1 - function-keys\n" + " [2] - special keys"); +static bool appletb_tb_fn_toggle = true; +module_param_named(fntoggle, appletb_tb_fn_toggle, bool, 0644);