Re: [PATCH v4] HID: appletb-kbd: support layer switching on Fn double press

From: Aditya Garg

Date: Fri Sep 11 2026 - 16:08:47 EST




On 11/09/26 10:15 pm, Jiri Kosina wrote:
> On Sat, 5 Sep 2026, Aditya Garg wrote:
>
>>> Holding Fn temporarily switches the Touch Bar between media controls and
>>> function keys. Users who want to keep the alternate layer currently need
>>> to change the mode through sysfs.
>>>
>>> An optional double_press_switch_time module parameter makes a double press
>>> persistently switch the default layer. Its value specifies the double-press
>>> interval in milliseconds, while zero leaves the behavior disabled.
>>>
>>> Signed-off-by: Aditya Garg <aditya.garg@xxxxxxxxx>
>>> Signed-off-by: Andre Eikmeyer <dev@deq.rocks>
>>> ---
>>> Changes in v2:
>>> - Added a check to ensure negative fn switch times are ignored.
>>>
>>> Changes in v3:
>>> - Renamed the backing variable to match the module parameter.
>>> - Fixed the reported code style issues.
>>>
>>> Changes in v4:
>>> - Added missing "break;" in case statements.
>>> - Change author's email to aditya.garg@xxxxxxxxx
>>
>> Now that I see it, the case statements were ending in return. break was
>> not needed. Sorry for the brainfart.
>
> Please send v5 and I will apply it.

Sent here:

https://lore.kernel.org/linux-input/20260911200019.17028-1-aditya.garg@xxxxxxxxx/T/#u