From: Hans de Goede <hdegoede@redhat.com>
To: "Werner Sembach" <wse@tuxedocomputers.com>,
mario.limonciello@amd.com,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v2 2/2] Input: atkbd - Fix TUXEDO NB02 notebook keyboards FN-keys
Date: Wed, 5 Mar 2025 12:25:05 +0100 [thread overview]
Message-ID: <1bee0a62-058b-482a-8eec-d45b8aca1614@redhat.com> (raw)
In-Reply-To: <20250303190442.551961-2-wse@tuxedocomputers.com>
Hi Werner,
On 3-Mar-25 8:04 PM, Werner Sembach wrote:
> This small driver does 2 things:
>
> It remaps the touchpad toggle key from Control + Super + Hangaku/Zenkaku to
> F21 to conform with established userspace defaults. Note that the
> Hangaku/Zenkaku scancode used here is usually unused, with real
> Hangaku/Zenkaku keys using the tilde scancode.
So this control + super + scancode 0x76 sending is also seen on
quite a few other laptops and I think we need a generic fix for this.
I recently noticed that KDE's keyboard-shortcut settings actually has
a control + super + Hangaku/Zenkaku -> touchpad-toggle key binding
in its default bindings (IIRC). But that cannot work because xkb actually
has no mapping for evdev code 85 / KEY_ZENKAKUHANKAKU if you look in:
/usr/share/X11/xkb/keycodes/evdev and then look for 93 (*) you will
find no mapping. I think this KDE default binding may be from a long
time ago when this did work. Or maybe KDE uses the FOO part of KEY_FOO
as symbolic when there is no xkb mapping ?
*) 85 + 8 all codes there are shifted up 8 compared to the KEY_FOO
defines because codes 0-7 are reserved for modifier.
I hit the same issue years ago on "T-boa Tbook air" laptop and
their I fixed this by mapping Hangaku/Zenkaku -> f21 in
/lib/udev/hwdb.d/60-keyboard.hwdb :
###########################################################
# T-bao
###########################################################
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnT-bao:pnTbookair:*
KEYBOARD_KEY_76=f21 # Touchpad toggle
+ teaching GNOME to also accept Ctrl + Super + XF86TouchpadToggle
as touchpad-toggle:
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/master/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in?ref_type=heads#L577
Notice that system76 has the same hwdb key mapping for their
Pangolin 12 model which I presume also has something like e.g.
a clevo as base model.
So for now to fix the touchpad on this TUXEDO NB02 you should
simply add a hwdb entry like the above entries.
Longer term I think the right fix for the touchpad toggle for
all laptops which do this would be to make GNOME do what KDE does
and change the touchpad-toggle-static keybinding list which
currently is:
['XF86TouchpadToggle', '<Ctrl><Super>XF86TouchpadToggle']
to:
['XF86TouchpadToggle', '<Ctrl><Super>XF86TouchpadToggle', '<Ctrl><Super>"Something"']
Where "Something" would then be the new mapping. Or maybe just teach
atkbd or xkb or hwdb to map scancode 0x76 to TouchpadToggle by
default then at least in GNOME this will work OOTB and for KDE
a default binding of '<Ctrl><Super>XF86TouchpadToggle'] -> touchpad-toggle
should probably be added there.
> It suppresses the reserved scancode produced by pressing the FN-key on its
> own, which fixes a warning spamming the dmesg log otherwise.
Can you not also suppress this by mapping the key to "unknown" in hwdb?
Regards,
Hans
next prev parent reply other threads:[~2025-03-05 11:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 19:04 [PATCH v2 1/2] Input: atkbd - map F21 key to support touchpad toggle keys Werner Sembach
2025-03-03 19:04 ` [PATCH v2 2/2] Input: atkbd - Fix TUXEDO NB02 notebook keyboards FN-keys Werner Sembach
2025-03-04 18:53 ` Mario Limonciello
2025-03-04 20:11 ` Werner Sembach
2025-03-05 1:01 ` Armin Wolf
2025-03-05 12:07 ` Werner Sembach
2025-03-05 11:25 ` Hans de Goede [this message]
2025-03-05 12:07 ` Werner Sembach
2025-03-05 14:18 ` Hans de Goede
2025-03-05 15:41 ` Werner Sembach
2025-03-06 14:46 ` Hans de Goede
2025-03-06 17:43 ` Werner Sembach
2025-03-06 18:07 ` Werner Sembach
2025-03-07 17:52 ` Werner Sembach
2025-03-05 6:54 ` [PATCH v2 1/2] Input: atkbd - map F21 key to support touchpad toggle keys Dmitry Torokhov
2025-03-05 12:18 ` Werner Sembach
2025-03-05 12:56 ` Hans de Goede
2025-03-05 12:55 ` Hans de Goede
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=1bee0a62-058b-482a-8eec-d45b8aca1614@redhat.com \
--to=hdegoede@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=wse@tuxedocomputers.com \
/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
all inboxes | Powered by JetHome®