Bug 493025 - Unable to associate CTRL+ALT+BACKSPACE sequence as a shortcut; BACKSPACE detected as "Unidentified"
Summary: Unable to associate CTRL+ALT+BACKSPACE sequence as a shortcut; BACKSPACE dete...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 6.1.5
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-12 17:43 UTC by antonio
Modified: 2025-05-01 17:59 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
sequence detected from www.mechanical-keyboard.org/ (130.46 KB, image/png)
2024-09-19 13:20 UTC, antonio
Details
debian output (11.39 KB, text/plain)
2025-04-28 20:36 UTC, antonio
Details
opensuse outpu (11.40 KB, text/plain)
2025-04-28 20:36 UTC, antonio
Details
keyboard settings (32.44 KB, image/png)
2025-04-29 05:50 UTC, antonio
Details
mouse settings (39.22 KB, image/png)
2025-04-29 05:50 UTC, antonio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description antonio 2024-09-12 17:43:53 UTC
I can't bind the CTRL+ALT+BACKSPACE shortcut to Plasma "logout without confirmation", the backspace key does not seem to be detected when associated with ALT+CTRL (while other combinations, for example: CTRL+META+BACKSPACE, are correctly detected).

Thanks,
Antonio

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.6.2
Kernel Version: 6.10.9-1-liquorix-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 12th Gen Intel® Core™ i9-12900T
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 770
Manufacturer: ASUS
Comment 1 antonio 2024-09-13 11:50:32 UTC
> Same problem on Gecko:

Operating System: openSUSE Tumbleweed 20240911
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2


> OK on Fedora 40:

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Comment 2 Noah Davis 2024-09-19 11:32:57 UTC
I cannot reproduce this. It could be that your keyboard does not support this combination of keys. Try this website: https://www.mechanical-keyboard.org/key-rollover-test/
Comment 3 antonio 2024-09-19 13:19:39 UTC
(In reply to Noah Davis from comment #2)
> I cannot reproduce this. It could be that your keyboard does not support
> this combination of keys. Try this website:
> https://www.mechanical-keyboard.org/key-rollover-test/

The test was helpful because the "backspace" key is detected as "unidentified" (ctrl,alt,unidentified), even though it still detects the sequence of three pressed keys.

However it can't be a keyboard problem, because it was working end a month or two ago (I couldn't tell you the exact version of plasma/framework from which it stopped working).

It can't even be a distribution-specific issue since a couple of them have the problem. I think one of the plasma updates created the problem.
Comment 4 antonio 2024-09-19 13:20:31 UTC
Created attachment 173873 [details]
sequence detected from www.mechanical-keyboard.org/
Comment 5 Nate Graham 2024-09-19 18:51:02 UTC
Can you clarify where exactly you're trying to set this shortcut? Is it on System Settings' Shortcuts page?
Comment 6 antonio 2024-09-20 07:12:21 UTC
(In reply to Nate Graham from comment #5)
> Can you clarify where exactly you're trying to set this shortcut? Is it on
> System Settings' Shortcuts page?

Yes, I open "systemsettings" and select:
  - Keyboard
    - Shortcuts
      - Session Management
        - "exit without confirm"
        - button "add custom shortcut"
        - press "ALT+CTRL+BACKSPACE"

but only ALT+CTRL is shown on the screen, BACKSPACE is not ignored (as if I had not pressed it).

However, if I try other combinations, for example: CTRL+SHIFT+BACKSPACE, META+SHIFT+BACKSPACE, ALT+META+BACKSPACE, ALT+SHIFT+BACKSPACE, they are recognized correctly and accepted.

Before the problem occurred I had already set this shortcut with the indicated sequence and it worked fine; for some time I noticed that this shortcut did not work anymore, so I went back to the shortcuts page and nothing had changed, the screen always showed CTRL+ALT+BACKSPACE, even if it did not work. So I tried to reset it again, but I noticed it no longer accepted this combination.
Comment 7 Nate Graham 2024-09-20 18:00:02 UTC
I can successfully set that combination on my system FWIW.
Comment 8 antonio 2024-09-20 18:48:08 UTC
For a simple test you can also try with OpenSuse live (from: https://download.opensuse.org/download/distribution/openSUSE-current/live/openSUSE-Leap-15.6-KDE-Live-x86_64-Build13.327-Media.iso):

- start iso
- system settings
- switch to sidebar view button
- shortcuts
- ksmserver
- log out without confirmation
- add custom shortcuts button
- press: ALT+CTRL+BACKSPACE

same problem, the third key pressed, "backspace", is not detected

and there is a different version of kde/framework:

Operating System: openSUSE Leap 15.6
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.4.0-150600.23.17-default (64-bit)

maybe it could be an indirect problem generated by a library
Comment 9 Nate Graham 2025-04-08 19:36:34 UTC
Can you check again in Plasma 6.3 or later and see if this is still happening?

If so, it would also be great to learn if it's happening to you only on X11, only on Wayland, or both.

Thanks a lot!
Comment 10 antonio 2025-04-09 07:18:40 UTC
(In reply to Nate Graham from comment #9)
> Can you check again in Plasma 6.3 or later and see if this is still
> happening?
> 
> If so, it would also be great to learn if it's happening to you only on X11,
> only on Wayland, or both.
> 
> Thanks a lot!

Hi,
I tried it on the installations I have available:

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2

Graphics Platform: Wayland -> It does not work
Graphics Platform: X11 -> I can't verify

and:

Operating System: openSUSE Tumbleweed 20250405
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

Graphics Platform: Wayland -> It does not work
Graphics Platform: X11 -> It does not work

It seems that in both systems the CTRL+ALT+BACKSPACE sequence was not detected.
Comment 11 Nate Graham 2025-04-09 16:32:32 UTC
Thanks for testing! I do suspect this is hardware-specific, but will need someone more experienced in these matters to confirm or reject that hypothesis.
Comment 12 antonio 2025-04-11 10:57:59 UTC
(In reply to Nate Graham from comment #11)
> Thanks for testing! I do suspect this is hardware-specific, but will need
> someone more experienced in these matters to confirm or reject that
> hypothesis.

I tried on the same hardware with a backup I had of fedora 40:

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

and it worked,
I can assign the sequence and use it, so the problem seems to be the software, not necessarily in kde plasma, there could be differences in packages, interfering programs, missing software or different configurations.
Comment 13 fanzhuyifan 2025-04-26 03:41:36 UTC
What do you see if you run `sudo libinput debug-events --show-keycodes` and press `CTRL+ALT+BACKSPACE`?

Also in application launcher, search for "kwin debug console", and go to the Input Events tab. When you press `CTRL+ALT+BACKSPACE`, what do you see there?
Comment 14 antonio 2025-04-26 07:46:52 UTC
(In reply to fanzhuyifan from comment #13)
> What do you see if you run `sudo libinput debug-events --show-keycodes` and
> press `CTRL+ALT+BACKSPACE`?
> 
> Also in application launcher, search for "kwin debug console", and go to the
> Input Events tab. When you press `CTRL+ALT+BACKSPACE`, what do you see there?

Hi,

$ sudo libinput debug-events --show-keycodes
-event2   DEVICE_ADDED                 Power Button                      seat0 default group1  cap:k
-event5   DEVICE_ADDED                 Video Bus                         seat0 default group2  cap:k
-event1   DEVICE_ADDED                 Power Button                      seat0 default group3  cap:k
-event0   DEVICE_ADDED                 Sleep Button                      seat0 default group4  cap:k
-event4   DEVICE_ADDED                 Logitech Wireless Keyboard PID:4023 seat0 default group5  cap:kp scroll-nat
-event3   DEVICE_ADDED                 Logitech Wireless Mouse           seat0 default group6  cap:kp left scroll-nat scroll-button
-event7   DEVICE_ADDED                 C-Media Electronics Inc. C-Media(R) Audio seat0 default group7  cap:k
-event4   KEYBOARD_KEY                 +0.000s  KEY_LEFTCTRL (29) pressed
 event4   KEYBOARD_KEY                 +1.448s  KEY_LEFTALT (56) pressed
 event4   KEYBOARD_KEY                 +2.696s  KEY_BACKSPACE (14) pressed
 event4   KEYBOARD_KEY                 +2.792s  KEY_BACKSPACE (14) released
 event4   KEYBOARD_KEY                 +3.760s  KEY_LEFTCTRL (29) released
 event4   KEYBOARD_KEY                 +3.784s  KEY_LEFTALT (56) released

 under krunner -> win debug consule:
 qt_keycode   Keycode
   29                     Key_Control
   56                     Key_Alt
   14                     -
   14                     - 
   56                     Key_Alt
   29                     Key_Control
Comment 15 antonio 2025-04-27 06:36:37 UTC
I also tested on OpenSUSE:

$ sudo libinput debug-events --show-keycodes
-event2   DEVICE_ADDED                 Power Button                      seat0 default group1  cap:k
-event10  DEVICE_ADDED                 Video Bus                         seat0 default group2  cap:k
-event1   DEVICE_ADDED                 Power Button                      seat0 default group3  cap:k
-event0   DEVICE_ADDED                 Sleep Button                      seat0 default group4  cap:k
-event22  DEVICE_ADDED                 MyGica Mini DVB-(T/T2/C) USB Stick T230 seat0 default group5  cap:kp left scroll-nat scroll-button
-event3   DEVICE_ADDED                 KTMicro KT USB Audio Consumer Control seat0 default group6  cap:k
-event4   DEVICE_ADDED                 KTMicro KT USB Audio              seat0 default group6  cap:k
-event6   DEVICE_ADDED                 Logitech Wireless Keyboard PID:4023 seat0 default group7  cap:kp scroll-nat
-event5   DEVICE_ADDED                 Logitech Wireless Mouse           seat0 default group8  cap:kp left scroll-nat scroll-button
-event9   DEVICE_ADDED                 Asus WMI hotkeys                  seat0 default group9  cap:k
-event8   DEVICE_ADDED                 Eee PC WMI hotkeys                seat0 default group10 cap:k
-event6   KEYBOARD_KEY                 +0.000s  KEY_LEFTCTRL (29) pressed
 event6   KEYBOARD_KEY                 +0.672s  KEY_LEFTALT (56) pressed
 event6   KEYBOARD_KEY                 +1.640s  KEY_BACKSPACE (14) pressed
 event6   KEYBOARD_KEY                 +1.760s  KEY_BACKSPACE (14) released
 event6   KEYBOARD_KEY                 +3.600s  KEY_LEFTALT (56) released
 event6   KEYBOARD_KEY                 +3.656s  KEY_LEFTCTRL (29) released

win debug console:
 qt_keycode   Keycode
   29           Key_Control
   56           Key_Alt
   14           -
   14           - 
   56           Key_Alt
   29           Key_Control
Comment 16 fanzhuyifan 2025-04-28 19:38:18 UTC
(In reply to antonio from comment #15)
> -event6   KEYBOARD_KEY                 +0.000s  KEY_LEFTCTRL (29) pressed
>  event6   KEYBOARD_KEY                 +0.672s  KEY_LEFTALT (56) pressed
>  event6   KEYBOARD_KEY                 +1.640s  KEY_BACKSPACE (14) pressed
>  event6   KEYBOARD_KEY                 +1.760s  KEY_BACKSPACE (14) released
>  event6   KEYBOARD_KEY                 +3.600s  KEY_LEFTALT (56) released
>  event6   KEYBOARD_KEY                 +3.656s  KEY_LEFTCTRL (29) released
> 
> win debug console:
>  qt_keycode   Keycode
>    29           Key_Control
>    56           Key_Alt
>    14           -
>    14           - 
>    56           Key_Alt
>    29           Key_Control

Thanks! I think the left column should be keycode, and the right column is Qt_keycode. This indicates that the backspace press is not translating to Qt Keys correctly.

Could you also attach the output of `xmodmap -pke`? In particular, note the output of Keycode 22 (this is backspace, 22=14+8).
Comment 17 antonio 2025-04-28 20:35:37 UTC
(In reply to fanzhuyifan from comment #16)
> (In reply to antonio from comment #15)
> > -event6   KEYBOARD_KEY                 +0.000s  KEY_LEFTCTRL (29) pressed
> >  event6   KEYBOARD_KEY                 +0.672s  KEY_LEFTALT (56) pressed
> >  event6   KEYBOARD_KEY                 +1.640s  KEY_BACKSPACE (14) pressed
> >  event6   KEYBOARD_KEY                 +1.760s  KEY_BACKSPACE (14) released
> >  event6   KEYBOARD_KEY                 +3.600s  KEY_LEFTALT (56) released
> >  event6   KEYBOARD_KEY                 +3.656s  KEY_LEFTCTRL (29) released
> > 
> > win debug console:
> >  qt_keycode   Keycode
> >    29           Key_Control
> >    56           Key_Alt
> >    14           -
> >    14           - 
> >    56           Key_Alt
> >    29           Key_Control
> 
> Thanks! I think the left column should be keycode, and the right column is
> Qt_keycode. This indicates that the backspace press is not translating to Qt
> Keys correctly.
> 
> Could you also attach the output of `xmodmap -pke`? In particular, note the
> output of Keycode 22 (this is backspace, 22=14+8).

debian:
	keycode  22 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server
	
opensuse:
	keycode  22 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server

I have also attached the complete output of the command.
Comment 18 antonio 2025-04-28 20:36:02 UTC
Created attachment 180748 [details]
debian output
Comment 19 antonio 2025-04-28 20:36:46 UTC
Created attachment 180749 [details]
opensuse outpu
Comment 20 fanzhuyifan 2025-04-28 22:23:54 UTC
(In reply to antonio from comment #19)
> Created attachment 180749 [details]
> opensuse outpu

Thanks! All of that looks reasonable.

Here is a wild shot in the dark --
What versions of libxkbcommon do you have on the systems with and without the issue?
What keyboard layout do you use? (a screenshot of settings - keyboard would suffice)

I see that Qt version doesn't seem to be a factor, since 

(In reply to antonio from comment #1)
> > Same problem on Gecko:
> 
> Operating System: openSUSE Tumbleweed 20240911
> KDE Plasma Version: 6.1.5
> KDE Frameworks Version: 6.5.0
> Qt Version: 6.7.2
> 
> 
> > OK on Fedora 40:
> 
> Operating System: Fedora Linux 40
> KDE Plasma Version: 6.1.4
> KDE Frameworks Version: 6.5.0
> Qt Version: 6.7.2

Other than that I am a bit clueless. I think the kwin code that generates Qt key codes lives here: https://invent.kde.org/plasma/kwin/-/blob/d22b6128c4cb8f7a91b8b43af28a3b849b740e2c/src/keyboard_input.cpp#L289
Comment 21 antonio 2025-04-29 05:49:51 UTC
(In reply to fanzhuyifan from comment #20)
> (In reply to antonio from comment #19)
> > Created attachment 180749 [details]
> > opensuse outpu
> 
> Thanks! All of that looks reasonable.
> 
> Here is a wild shot in the dark --
> What versions of libxkbcommon do you have on the systems with and without
> the issue?
> What keyboard layout do you use? (a screenshot of settings - keyboard would
> suffice)
> 
> I see that Qt version doesn't seem to be a factor, since 
> 
> (In reply to antonio from comment #1)
> > > Same problem on Gecko:
> > 
> > Operating System: openSUSE Tumbleweed 20240911
> > KDE Plasma Version: 6.1.5
> > KDE Frameworks Version: 6.5.0
> > Qt Version: 6.7.2
> > 
> > 
> > > OK on Fedora 40:
> > 
> > Operating System: Fedora Linux 40
> > KDE Plasma Version: 6.1.4
> > KDE Frameworks Version: 6.5.0
> > Qt Version: 6.7.2
> 
> Other than that I am a bit clueless. I think the kwin code that generates Qt
> key codes lives here:
> https://invent.kde.org/plasma/kwin/-/blob/
> d22b6128c4cb8f7a91b8b43af28a3b849b740e2c/src/keyboard_input.cpp#L289

- Debian 12 sid, libxkbcommon 1.7.0-2 -> with issue
- openSUSE Tumbleweed 20240911, libxkbcommon0-1.9.0-1.1 -> with issue
- Fedora 40, libxkbcommon 1.6.0-2.fc40 -> without issue

Wireless Keyboard Logitec K270  (keyboard+mouse)

attached screenshots
Comment 22 antonio 2025-04-29 05:50:11 UTC
Created attachment 180756 [details]
keyboard settings
Comment 23 antonio 2025-04-29 05:50:37 UTC
Created attachment 180757 [details]
mouse settings
Comment 24 fanzhuyifan 2025-04-29 18:55:43 UTC
(In reply to antonio from comment #21)
> - Debian 12 sid, libxkbcommon 1.7.0-2 -> with issue
> - openSUSE Tumbleweed 20240911, libxkbcommon0-1.9.0-1.1 -> with issue
> - Fedora 40, libxkbcommon 1.6.0-2.fc40 -> without issue

Thanks! It seems that for systems with and without issue, the versions of libxkbcommon are quite different.

Any chance you could test if upgrading libxkbcommon on the system without issue leads to the issue, or vice versa?

Other than that I am out of ideas, and you may need to do some experimentation on your own to figure out which package update is causing the issue.
Comment 25 John Kizer 2025-04-30 18:21:35 UTC
Updating status, pending possible testing of libxkbcommon versions as a factor - thanks!
Comment 26 antonio 2025-04-30 19:26:39 UTC
(In reply to John Kizer from comment #25)
> Updating status, pending possible testing of libxkbcommon versions as a
> factor - thanks!

I solved it for Debian, but not for Opensuse.

steps performed:
- I downgraded libxkbcommon to version 1.5.0-1 but it didn't fix the problem.
- I installed the latest debian testing on a virtual machine and noticed that the sequence worked.
- I converted the broken Debian installation to a virtual machine, ran the test and verified that it did not detect the sequence.
- I compared the configuration, until I found the interference in the "/etc/default/keyboard" file.

version with the problem:
	XKBMODEL="pc105"
	XKBLAYOUT="it"
	XKBOPTIONS="terminate:ctrl_alt_bksp"
	BACKSPACE="guess"
	XKBVARIANT=""

version ok;
	XKBMODEL="pc105"
	XKBLAYOUT="it"
	XKBVARIANT=""
	XKBOPTIONS=""
	BACKSPACE="guess"

- replaced the indicated file on the (real) Debian installation, rebooted, and noticed that the problem was gone and that I could assign this sequence

- as a counter test I replaced the file in the working version of the vm with the one that gave the problem, restarted, and I noticed that the version that was previously working now did not recognize this sequence
	
On OpenSUSE, however, the file was already correct, so the problem is elsewhere. This tells us however that the detection is sensitive to environment variables; it would be interesting to check where there is interference.
Comment 27 fanzhuyifan 2025-04-30 20:10:53 UTC
(In reply to antonio from comment #26)
> 	XKBOPTIONS="terminate:ctrl_alt_bksp"
This indicates that you set the option such that ctrl+alt+backspace should kill the x server. Hence it seems reasonable that this keypress is not detected in kwin, since kwin key processing relies on libxkb.


> On OpenSUSE, however, the file was already correct, so the problem is
> elsewhere. This tells us however that the detection is sensitive to
> environment variables; it would be interesting to check where there is
> interference.
On OpenSUSE where you still have the problem, what is the output of setxkbmap -print -verbose 10? Let's see if there are some options that could be interferring with the detection.
Comment 28 antonio 2025-05-01 07:31:06 UTC
(In reply to fanzhuyifan from comment #27)
> (In reply to antonio from comment #26)
> > 	XKBOPTIONS="terminate:ctrl_alt_bksp"
> This indicates that you set the option such that ctrl+alt+backspace should
> kill the x server. Hence it seems reasonable that this keypress is not
> detected in kwin, since kwin key processing relies on libxkb.
> 
> 
> > On OpenSUSE, however, the file was already correct, so the problem is
> > elsewhere. This tells us however that the detection is sensitive to
> > environment variables; it would be interesting to check where there is
> > interference.
> On OpenSUSE where you still have the problem, what is the output of
> setxkbmap -print -verbose 10? Let's see if there are some options that could
> be interferring with the detection.

I solved it on Opensuse too.

Running the command you gave me, put me on the right track:

$ setxkbmap -print -verbose 10
Setting verbose level to 10
WARNING: Running setxkbmap against an Xwayland server
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};

I noticed the "us" layout (while it should be "it"), so I checked the locale:

$ localectl
System Locale: LANG=it_IT.utf8
    VC Keymap: it2
   X11 Layout: it
    X11 Model: pc105
  X11 Options: terminate:ctrl_alt_bksp

and to my surprise I noticed that the "X11 Options" were set. I looked in which files the setting was contained and I found:

grep returns:
/etc/vconsole.conf:4:XKBOPTIONS=terminate:ctrl_alt_bksp
/etc/X11/xorg.conf.d/00-keyboard.conf:9:        Option "XkbOptions" "terminate:ctrl_alt_bksp"

I commented out the line 'Option "XkbOptions" "terminate:ctrl_alt_bksp', but the problem persisted.

$ cat X11/xorg.conf.d/00-keyboard.conf
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "it"
        Option "XkbModel" "pc105"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Then I commented out the line 'XKBOPTIONS=terminate:ctrl_alt_bksp' in the other file:

$ cat /etc/vconsole.conf
KEYMAP=it2
XKBLAYOUT=it
XKBMODEL=pc105
XKBOPTIONS=terminate:ctrl_alt_bksp
FONT=eurlatgr.psfu
FONT_MAP=trivial

and that solved the problem. In fact, after rebooting, running 'localectl' again the 'X11 Options' entry was no longer present:

$ localectl
System Locale: LANG=it_IT.utf8
    VC Keymap: it2
   X11 Layout: it
    X11 Model: pc105

I don't recall manually editing these files. For Debian it might be a legacy of the previous use of Plasma on X11; while for Opensuse, where I only used Plasma on wayland, it might be a default.

Anyway, it works on both systems now. I hope this track can be useful for those who experience the same problem.

Thanks for the assistance.
Comment 29 Wismill 2025-05-01 07:57:11 UTC
Coming late to the battle, but I have some comments:
- XkbOptions="terminate:ctrl_alt_bksp" seems an ubiquitous default setting, but I might be wrong. I do remember seeing the CTRL+ALT+BACKSPACE shortcut in tutorials, a… long time ago 😅. Since it is set in system files, KDE just pick up the option. However, in Wayland the env variable is `XKB_DEFAULT_OPTIONS`, see: https://invent.kde.org/plasma/kwin/-/blob/5f4ff1d49d1818521915543c942ddf6dda60ebc3/src/xkb.cpp#L573. So there should be a translation somewhere.
- setxkbmap does not work in Wayland sessions. Use:
  - cat ~/.config/kxkbrc in KDE to show you keyboard config. There may be a better way with dbus specific to KDE, I do not remember how to query it.
  - xkbcli dump-keymap-wayland to get the actual keymap. You need libxkbcommon-tools 1.8+.
  - xkbcli interactive-wayland to replace xev
- There is no libxkb, but libxkbfile (X11) and libxkbcommon (Wayland).

@antonio: when XkbOptions is set/unset, does it change your ~/.config/kxkbrc?
Comment 30 antonio 2025-05-01 08:08:14 UTC
> @antonio: when XkbOptions is set/unset, does it change your ~/.config/kxkbrc?

I set the XkbOptions by editing the files above, so without using localectl.
The file does not change, the timestamp remains unchanged.

File contents:

[$Version]
update_info=kxkb.upd:remove-empty-lists,kxkb.upd:add-back-resetoptions,kxkb_variants.upd:split-variants
Comment 31 Wismill 2025-05-01 08:36:48 UTC
(In reply to antonio from comment #30)
> > @antonio: when XkbOptions is set/unset, does it change your ~/.config/kxkbrc?
> File contents:
> 
> [$Version]
> update_info=kxkb.upd:remove-empty-lists,kxkb.upd:add-back-resetoptions,
> kxkb_variants.upd:split-variants

So it seems that you never change any keyboard setting in KDE and that you keyboard config is entirely set from the environment variables.

I try on my own setup (Plasma 6.3.4, Wayland), and I think that the root issue is that QXkbCommon::keysymToQtKey or similar does not handle the keysym XKB_KEY_Terminate_Server that is generated by CTRL+ALT+BACKSPACE when the option "terminate:ctrl_alt_bksp" is set. Thus when setting a global shortcut KDE registers Ctrl+Alt, instead of Ctrl+Alt+Terminate_Server.

I see 2 issues:
- KDE should not register a shortcut when one of the keysym is not translated correctly (i.e. returns NoSymbol or Qt equivalent)
- KDE should support all XKB keysyms. If the limit is what Qt supports, either fix Qt or have a hack to support more keysyms, if possible.