Created attachment 168405 [details] Video of the bug SUMMARY Using the native keyboard function to toggle the touchpad is activating to off and directly on STEPS TO REPRODUCE 1. Press the touchpad function button toggle 2. see the Touchpad off and without any action Touchpad on See video attached for more information No log appear on the syslog file SOFTWARE/OS VERSIONS Operating System: KDE neon 6.0 KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.7.0 Kernel Version: 6.5.0-27-generic (64-bit) Graphics Platform: Wayland Processors: 16 × 13th Gen Intel® Core™ i7-1360P Memory: 31,1 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: LG Electronics Product Name: 16Z90R-G.AD78F System Version: 0.1
Just discover that trying to use the "Function + Touchpad Toggle" as a custom shortcut, Plasma will detect it as "Control, Touchpad Toggle". Using a custom global shortcut (without using this function touch) works as expected
If you set a custom keyboard shortcut for the "Touchpad Toggle" action in System Settings > Keyboard > Shortcuts > Touchpad, and then trigger that shortcut by pressing its shortcut once, does the same problem happen? Or does it correctly toggle on or off as expected?
Created attachment 168406 [details] shortcut declared with function key
With a custom global shortcut, it works well. I try to setup a global shortcut with that function key, the shortcut shown is "Control, Touchpad Toggle" and not a simple "Touchpad Toggle" (see screenshot), maybe related?
Ok, then what's happening here is that when you press the "toggle touchpad" key on your keyboard, it's sending two key events rather than one. So the first event toggles it, and then second one toggles it again. Obviously, this isn't going to work! :D The problem is either in your keyboard's hardware, or else in a deeper part of the stack, maybe Libinput or the kernel. Not in KDE code. So I'd recommend following up with the Libinput folks to start with. Maybe it's their bug or they can debounce these events. https://gitlab.freedesktop.org/libinput/libinput/-/issues/ Good luck!
Are you sure? The button on the same laptop is working well on ubuntu 23.10 with cinammon or gnome shell
Pretty sure. Maybe in GNOME and Cinnamon they debounce rapidly repeated toggle touchpad events themselves to workaround this bug? Or maybe it's a recent kernel regression that's affecting the kernel version you're using but not the kernel version that's in Ubuntu 23.10. Either way if setting a different key for this action works, then I have difficulty seeing how it could be anything else.
I tested with that command $ xev | awk /keysym/'{sub(/\),/,""); print $7}' Super_L Control_L NoSymbol NoSymbol Control_L Super_L XF86TouchpadToggle XF86TouchpadToggle All of these events for a single touch press and release ^^ You should be right so, thanks for your help
(In reply to tchiot.ludo from comment #8) > I tested with that command > > $ xev | awk /keysym/'{sub(/\),/,""); print $7}' > Super_L > Control_L > NoSymbol > NoSymbol > Control_L > Super_L > XF86TouchpadToggle > XF86TouchpadToggle > > > All of these events for a single touch press and release ^^ > > You should be right so, thanks for your help Sliding in here: I suspect you are using tuxedo-drivers? If Yes what you are seeing is: - Left Meta key down (from firmware) - Left CTRL key down (from firmware) - Zenkaku/Hangaku key down (from firmware) - Zenkaku/Hangaku key up (from firmware) - Left CTRL key up (from firmware) - Left Meta key up (from firmware) - F21 key up (from driver) - F21 key up (from driver) The Zenkaku/Hangaku key (https://en.wikipedia.org/wiki/Language_input_keys#Half-width/Full-width/Kanji) is not one physically present on ANSI and ISO keyboards. The firmware sends the 3 key combo Meta+CTRL+Zenkaku/Hangaku upon pressing FN + Touchpad toggle. The driver listens to this 3 key combo and additionally sends a virtual F21 keypress which is bound to touchpad toggle by X11 and Xwayland. This worked fine in the past but now it seems that KDE has implemented the Meta+CTRL+Zenkaku/Hangaku key combo as well, causing the double touchpad toggle (Does someone have a reference at hand when this happened? A bugtracker ticket or a commit?). I'm writing here and all of this because I want to search for a clean solution, maybe someone who already has a good idea reads this as I'm still at the beginning of my research.
(In reply to Werner Sembach [TUXEDO] from comment #9) > - F21 key up (from driver) > - F21 key up (from driver) copy past error correction: - F21 key down (from driver) - F21 key up (from driver)