linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Henrie <alexhenrie24@gmail.com>
To: Aditya Garg <gargaditya08@live.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"jkosina@suse.cz" <jkosina@suse.cz>,
	 "benjamin.tissoires@redhat.com" <benjamin.tissoires@redhat.com>
Subject: Re: [PATCH resend] HID: apple: fix up the F6 key on the Omoton KB066 keyboard
Date: Sun, 16 Feb 2025 21:13:26 -0700	[thread overview]
Message-ID: <CAMMLpeQDVinMKsRi-u5afKSYzoG=FGgYPsHwibHgheZwHaJSQg@mail.gmail.com> (raw)
In-Reply-To: <67482FB6-C303-4578-8B3D-6F4A4039D379@live.com>

On Sat, Feb 15, 2025 at 11:06 PM Aditya Garg <gargaditya08@live.com> wrote:

> In case I am wrong, can you share what exactly happens in each mode with fn on as well as off?

In fnmode=0 and fnmode=2, F1 and F2 are F1 and F2, and the rest are
special keys when Fn is not held and ordinary function keys when Fn is
held.

In fnmode=1, F1 and F2 are Brightness Down and Brightness Up, and the
rest are always special keys, although holding Fn changes some of the
special keys to different special keys.

In all modes, Home becomes Escape when Fn is held, Lock (which is
actually Power) becomes Delete when Fn is held, and F6 always sends a
reserved key code.

On Sat, Feb 15, 2025 at 11:45 PM Aditya Garg <gargaditya08@live.com> wrote:
>
> I think its best to disable the internal translation of this keyboard and let the kernel manage it. It can be done by implementing a fixup table that first translates all the media controls to their respective F keys, and other similar internal translations, so that the keyboard can mimic the original Apple version. Like the all the 3 fn modes should also work.

The trouble is, we have no way to read the state of the Omoton's Fn
key in software. The Fn key is entirely internal to the keyboard. I
even looked at the raw HID reports with and without Fn pressed, and
there is nothing. So either we translate F1 and F2 to Brightness Down
and Brightness Up (in fnmode=1) or we don't translate them at all (in
fnmode=0 and fnmode=2); we can't conditionally translate depending on
the Fn key.

But for all the other special keys, what you are saying makes sense
and is a good idea: In fnmode=0, we can translate all of the special
keys to be ordinary keys, and in fnmode=2, we can translate them to
their opposites. For example, if the keyboard sends Volume Down, in
fnmode=0 and fnmode=2 we'd translate it to F11 (because the keyboard
only sends Volume Down when Fn is not held), and if it sends F11, in
fnmode=2 we'd translate it to Volume Down (because the keyboard only
sends F11 when Fn is held).

> Also looking at the keyboard pic on https://www.amazon.in/OMOTON-Ultra-Slim-Bluetooth-Keyboard-Compatible/dp/B07S7VPQG6?th=1, the translation table for magic keyboard aluminium seems quite different from what this keyboard keys show.

Let's please not change the special keys to be different from what
their labels show. For example, F3 is Search on the Omoton KB066 and
Scale on the Apple A1255. Personally I wouldn't even change Power to
Screen Lock to match its icon, although I'm okay with changing it if
others feel strongly.

-Alex

  reply	other threads:[~2025-02-17  4:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01  5:51 [PATCH] HID: apple: fix up the F6 key on the Omoton KB066 keyboard Alex Henrie
2025-01-17  6:12 ` [PATCH resend] " Alex Henrie
2025-02-03 21:57   ` Jiri Kosina
2025-02-05  3:02     ` Alex Henrie
2025-02-07 13:07   ` Jiri Kosina
2025-02-12 17:36   ` Aditya Garg
2025-02-12 17:43     ` Aditya Garg
2025-02-16  1:08       ` Alex Henrie
2025-02-16  6:06         ` Aditya Garg
2025-02-16  6:45           ` Aditya Garg
2025-02-17  4:13             ` Alex Henrie [this message]
2025-02-17  5:18               ` Aditya Garg
2025-02-17  6:42                 ` Alex Henrie
2025-02-17 10:02                   ` Aditya Garg
2025-02-17 10:03                     ` Aditya Garg
2025-02-24  2:50                     ` Alex Henrie
2025-02-24  4:44                       ` Alex Henrie
2025-02-24  5:05                         ` Aditya Garg
2025-02-24  5:18                           ` Alex Henrie
2025-02-24  5:30                             ` Aditya Garg
2025-02-24  5:40                               ` Alex Henrie
2025-02-24  5:46                                 ` Aditya Garg
2025-02-24  6:01                                   ` Alex Henrie
2025-02-24  2:46                   ` Alex Henrie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMMLpeQDVinMKsRi-u5afKSYzoG=FGgYPsHwibHgheZwHaJSQg@mail.gmail.com' \
    --to=alexhenrie24@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=gargaditya08@live.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).