Bug 504767 - FR BÉPO layout character not recognized
Summary: FR BÉPO layout character not recognized
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-25 11:59 UTC by Kilian GUILLAUME
Modified: 2025-05-28 09:56 UTC (History)
4 users (show)

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


Attachments
xkbcli interactive-wayland output (294 bytes, text/plain)
2025-05-28 08:42 UTC, Kilian GUILLAUME
Details
The ~/.config/kxbrc file on the machine where the problem occurs (252 bytes, text/plain)
2025-05-28 08:43 UTC, Kilian GUILLAUME
Details
/etc/vconsole.conf on the machine where the input works (217 bytes, text/plain)
2025-05-28 08:52 UTC, Kilian GUILLAUME
Details
/etc/vconsole.conf on the machine where the input works (fixed) (216 bytes, text/plain)
2025-05-28 08:53 UTC, Kilian GUILLAUME
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kilian GUILLAUME 2025-05-25 11:59:58 UTC
SUMMARY
When pressing "Alt Gr" + "spacebar" on my laptop, with the keyboard layout set as French BÉPO, a space is written instead of an underscore.

STEPS TO REPRODUCE
1. Set keyboard layout to BÉPO
2. Open any input (app launcher search bar for exemple)
3. Press "Alt Gr" + "spacebar" to enter an underscore

OBSERVED RESULT
A space is entered

EXPECTED RESULT
An underscore should be entered

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
This bug is also present in Sway/wlroots: https://github.com/swaywm/sway/issues/8199

However it works fine in gnome (wayland), weston, and tty.

It unfortunately seems sort of specific to this machine (Lenovo 82YM Yoga 7 14ARP8), as it works fine on two other device.

Also, plugging in an external keyboard doesn't fix the issue.
Comment 1 Nate Graham 2025-05-27 20:26:25 UTC
Does this happen on X11, Wayland, or both?
Comment 2 Kilian GUILLAUME 2025-05-28 06:32:00 UTC
Hi!

It happens on both Kde session types, X11 and Wayland.

However I tried to run an application directly in X11 (ghostty in xinitrc and running startx), and it works fine there
Comment 3 Wismill 2025-05-28 08:10:13 UTC
Could you provide your keyboard configuration `~/.config/kxkbrc` for both machines?

Could you try the following command in a Wayland session, keep the blank focused while typing `AltGr + Space` then copy the output of the command here? 

    xkbcli interactive-wayland

Note that you may need to install the package libxkbcommon-tools or similar name.
Comment 4 Kilian GUILLAUME 2025-05-28 08:42:17 UTC
Created attachment 181814 [details]
xkbcli interactive-wayland output

Here is the xkbcli interactive-wayland output in a wayland session
Comment 5 Kilian GUILLAUME 2025-05-28 08:43:39 UTC
Created attachment 181815 [details]
The ~/.config/kxbrc file on the machine where the problem occurs

And here are the contents of the kxbrc file on the lenovo machine
Comment 6 Kilian GUILLAUME 2025-05-28 08:52:28 UTC
Created attachment 181816 [details]
/etc/vconsole.conf on the machine where the input works

And finally, the machine where it works has no kxbrc file, and is instead configured with /etc/vconsole.conf
Comment 7 Kilian GUILLAUME 2025-05-28 08:53:33 UTC
Created attachment 181817 [details]
/etc/vconsole.conf on the machine where the input works (fixed)

Fixed a typo in the /etc/vconsole.conf
Comment 8 Wismill 2025-05-28 09:00:39 UTC
You use an option to switch layouts using the space key:

    Options=grp:win_space_toggle

which modifies the space key and is thus incompatible with the AltGr levels. You should either:
- move the Bépo layout at the second or later position, OR 
- deactivate this XKB option (advanced key binding) and instead use Plasma’s own feature to define the key combo to switch layouts.
Comment 9 Kilian GUILLAUME 2025-05-28 09:10:29 UTC
(In reply to Wismill from comment #8)
> You use an option to switch layouts using the space key:
> 
>     Options=grp:win_space_toggle
> 
> which modifies the space key and is thus incompatible with the AltGr levels.
> You should either:
> - move the Bépo layout at the second or later position, OR 
> - deactivate this XKB option (advanced key binding) and instead use Plasma’s
> own feature to define the key combo to switch layouts.

That was it. Thank you so much !

I wouldn't have guessed that the shortcut to switch layout could have an impact on the AltGr levels.

Having a warning of some kind in the UI would be great, but I'm not sure where the correct place to indicate conflicting key mappings and shortcuts would be.

I guess you could mark this bug as Resolved, thanks a lot for your time.
Comment 10 Wismill 2025-05-28 09:56:03 UTC
(In reply to Kilian GUILLAUME from comment #9)
> Having a warning of some kind in the UI would be great, but I'm not sure
> where the correct place to indicate conflicting key mappings and shortcuts
> would be.

It would be nice indeed, but by essence all the XKB options overwrite the layouts in some way, so it is hard to know *in general* if an overwrite is undesired. But maybe at some point, XKB options that can be handled at Plasma level like `grp:win_space_toggle` will be disabled in favor of the Plasma equivalent.

Marked as “solved (upstream)”, because it’s more an xkeyboard-config issue.