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

Selecting links by keyboard ignores X/Wayland keyboard layouts #218

Closed
jfmcbrayer opened this issue Mar 25, 2021 · 5 comments
Closed

Selecting links by keyboard ignores X/Wayland keyboard layouts #218

jfmcbrayer opened this issue Mar 25, 2021 · 5 comments
Labels
linux Relates some variant of Linux

Comments

@jfmcbrayer
Copy link

I use a non-standard keyboard layout, English(Colemak). I am running Fedora Linux, and using Sway (a Wayland compositor) for my desktop. The keyboard layout is set in Sway's configuration using xkb. Generally this is no problem and in Lagrange, it works fine in the URL box.

However, for selecting links by key, if I hit the key mapped to 'f', the links are not highlighted. I must press the key that is actually labeled 'F' to highlight the links, and select the links using their US English keys, rather than their Colemak keys. That is to say, selecting links works as if my keyboard were still set to US English.

The environment variable SDL_VIDEODRIVER=x11 is set, because SDL doesn't get along with Wayland on my system (Thinkpad X230, Intel graphics), which means that Lagrange is running through Xwayland, if that makes a difference.

@skyjake
Copy link
Owner

skyjake commented Mar 25, 2021

It's likely not possible to change the way SDL treats the keyboard events, but I could add a configuration file for specifying which keys are used for home row navigation. (Pretty much like issue #87.) The home row keys are currently hardcoded so it would be nice to have them configurable in any case.

@skyjake skyjake added the enhancement New feature or request label Mar 25, 2021
@jfmcbrayer
Copy link
Author

I checked this against an Xorg session not under Wayland, and it appears to work correctly. So actually, this is probably either an Xwayland bug, or a Sway bug, though this is the first app I've seen exercise it.

@skyjake skyjake added linux Relates some variant of Linux and removed enhancement New feature or request labels Mar 26, 2021
@skyjake
Copy link
Owner

skyjake commented Mar 26, 2021

In that case, I'll close the issue... I'm guessing there aren't that many non-game apps doing custom GUI over SDL. 🙂 I also currently don't have a Wayland setup to try reproducing this.

We can reopen if some details come to light that let me influence the behavior from within Lagrange.

@skyjake skyjake closed this as completed Mar 26, 2021
@skyjake
Copy link
Owner

skyjake commented Mar 26, 2021

Added #222 for the configurable home row keys.

@Soundtoxin
Copy link

Soundtoxin commented Apr 25, 2021

@jfmcbrayer Do you have multiple keyboard layouts enabled that you can switch between? If so, test with only Colemak enabled. You may be hitting this bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/2682
edit: there are like 4 gtk bugs marked duplicate, this one that should be related was recently fixed, supposedly. https://gitlab.gnome.org/GNOME/gtk/-/issues/1825
I have been working around it by only having my desired current layout enabled in my sway config and changing the config when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux Relates some variant of Linux
Projects
None yet
Development

No branches or pull requests

3 participants