Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland/GDM/Gnome doesn't support 5th level (with <> key) #3

Closed
drafolin opened this issue Sep 12, 2024 · 10 comments
Closed

Wayland/GDM/Gnome doesn't support 5th level (with <> key) #3

drafolin opened this issue Sep 12, 2024 · 10 comments

Comments

@drafolin
Copy link

I just installed this package on my Wayland - GDM - Gnome setup, but it doesn't seem to support the 5th level. I enabled the option in dconf, and the caps lock works for special symbols, but the <> key doesn't, for the navigation keys.

When i enable it with setxkbmap (with the help of Xwayland), it does work, but it's not ✨ clean ✨

Thx for you attention, will keep you updated if i figure out anything else

@mihi314
Copy link
Owner

mihi314 commented Sep 12, 2024

Hey, thx for trying it out :)

I'm currently using X, so maybe its related to that, but have you already had a look at this part of the readme and maybe the linked Neo FAQ there?

And by enabling it with setxkbmap you mean something like setxkbmap -option neolight instead of setxkbmap -layout neolight -variant de (i.e. the option variant instead of the full layout)? What is the before and after output of setxkbmap -query?

@drafolin
Copy link
Author

Heya, sorry for the delay, I was expecting answers to my issues to send me an e-mail.

Anyway, I tried the setxkbmap command again, but it seems that one of the updates I applied in the meantime broke this, and I can't use setxkbmap anymore. I don't remember if I had to log out or if it directly applied, if it was the first case, then now it resets to us with no options, if it's the second one... Well it doesn't directly apply anymore. I do remember setting the option instead of the variant though. Given how I can't reproduce it, I cannot give you the output of -query.

I also do remember having to set an option in the Tweaks application, namely the custom:types one. Speaking about which, wouldn't it be a good idea to add neolight to /usr/share/X11/xkb/rules/evdev.lst, as well as /usr/share/X11/xkb/rules/evdev.xml, in the option section? If I understood correctly, doing this would make it show up in the Tweaks application

For now, I am using ch+fr_nodeadkeys, with the neolight:escape_keys option configured with the help of dconf, but the <> still doesn't work.

I checked the section of the readme, but this only seems to be adressed to people having multiple keyboard layouts? I only have ch+fr_nodeadkeys.

@drafolin
Copy link
Author

Update: I just tried the <> layer with the neolight+de_escape_keys layout and no options, doesn't seem to work either...

@mihi314
Copy link
Owner

mihi314 commented Sep 28, 2024

I just got a new machine and am using wayland now as well. Same issue as you :/. So it does seem to be wayland-related. I'm going to look into it in more depth soon and hopefully fix it.

Speaking about which, wouldn't it be a good idea to add neolight to /usr/share/X11/xkb/rules/evdev.lst, as well as /usr/share/X11/xkb/rules/evdev.xml, in the option section? If I understood correctly, doing this would make it show up in the Tweaks application

Oh, I didn't know it's possible to modify those entires. I'll try adding them.

I checked the section of the readme, but this only seems to be adressed to people having multiple keyboard layouts? I only have ch+fr_nodeadkeys

You are right, if you only have one layout anyway it's not relevant.

@mihi314
Copy link
Owner

mihi314 commented Sep 28, 2024

The reason seems to be this: xkbcommon/libxkbcommon#18 (I'm using "RedirectKey" in the layout). Also no good workaround yet it seems: xkbcommon/libxkbcommon#145.

I'll try to do it without RedirectKey, like neo does, but this caused issues in the past in some applications (e.g. not properly recognizing the arrow keys, or interpreting them as someModifier+arrow). But maybe most of them have improved their keyboard handling by now.

@drafolin
Copy link
Author

drafolin commented Oct 1, 2024

Aha! I see.

Glad you found the issue! Lemme know if i can help in any way, I'd be more than happy to! (even tho i'm fairly new to the Linux universe...)

@mihi314
Copy link
Owner

mihi314 commented Oct 15, 2024

Alll right, found the time to work on it again. It should work on Wayland now. And happily, every application that previously had issues is working even without the RedirectKey (except for Sublime Text initially, but I found a good solution). Also the options show up in gnome-tweaks now.

I'll update the readme and release a new version in a while. In the meanwhile, if you want, it would be helpful if you could test if everything works now :)

@drafolin
Copy link
Author

sorry, was on holiday so i didn't pay any attention to github ^^'

Just tried it out and it works like wonders! Also just tried the new locking feature, works perfectly as well!

thanks for your reactivity! I would love to help you in that project but I have no idea how to work with all the stuff in this repository ^^'

@mihi314
Copy link
Owner

mihi314 commented Nov 8, 2024

Thanks for testing! I've released the new AUR package now (in case you are using archlinux).

Yeah, unfortunately the whole xkb configuration is particularly arcane and complicated. I've spend more hours and days on it over the years than I care to admit. Luckily there now is https://xkbcommon.org/doc/current/xkb-intro.html, which brings some amount of sanity at least to the documentation.

One thing that is missing is making the xkb-options work for other layouts than just the first. This issue gives some pointers on what is going on: xkbcommon/libxkbcommon#97 (comment) (starting from "This rule only applies to the first group, ...").

Maybe something like

! layout[2] option           = symbols
  *         neolight-layout2 = +neolight(layers):2

put here would already work?

If you ever feel the urge to work on this, let me know and I can give you some more pointers if you want.

@drafolin
Copy link
Author

i'll take a look this evening. I'll open a related issue (#4) and post updates there accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants