Skip to content

Fix keymap not correctly loading for the Ei backend#8121

Merged
nbolton merged 1 commit intodeskflow:masterfrom
BMagnu:fix_ei_keymap
Jan 21, 2025
Merged

Fix keymap not correctly loading for the Ei backend#8121
nbolton merged 1 commit intodeskflow:masterfrom
BMagnu:fix_ei_keymap

Conversation

@BMagnu
Copy link
Copy Markdown
Contributor

@BMagnu BMagnu commented Jan 21, 2025

On some systems, the keymap file provided by Ei required to create the XKB context is not properly seeked to the start.
This will cause reading the file to fail (or, more accurately, just cause 0 bytes to be read), causing the keymap to just default to a US-keymap.
This PR fixes this, causing the correct keymap to be loaded.
See input-leap/input-leap#2158
Apparently it also fixes #7886
/claim #7886

Copy link
Copy Markdown
Member

@nbolton nbolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm, on master I hit this line on KDE client in src/lib/platform/EiKeyState.cpp:

LOG_DEBUG("failed to create xkb context: %s", strerror(errno));

This PR appears to fix this.

Edit: I'm pretty sure this fixes #7886 too...

@nbolton nbolton enabled auto-merge (rebase) January 21, 2025 12:00
@BMagnu
Copy link
Copy Markdown
Contributor Author

BMagnu commented Jan 21, 2025

Oh, cool to hear that it also solves the Caps issue.
Didn't have that one on my radar when fixing the keymap issue.

@nbolton nbolton merged commit b13afbb into deskflow:master Jan 21, 2025
@algora-pbc
Copy link
Copy Markdown

algora-pbc bot commented Jan 21, 2025

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

@jwakely
Copy link
Copy Markdown
Contributor

jwakely commented Jan 21, 2025

I can confirm, on master I hit this line on KDE client in src/lib/platform/EiKeyState.cpp:

LOG_DEBUG("failed to create xkb context: %s", strerror(errno));

This PR appears to fix this.

Edit: I'm pretty sure this fixes #7886 too...

Great news!

Should the LOG_DEBUG be a warning or error instead?

@BMagnu
Copy link
Copy Markdown
Contributor Author

BMagnu commented Jan 21, 2025

IMO, yes.
This is fairly easy to miss in a bunch of debug messages, when it will cause issues for people if it triggers.
It's non fatal though, so warning doesn't sound too bad.

@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 21, 2025

Should the LOG_DEBUG be a warning or error instead?

I made it a warning in #8122

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

Successfully merging this pull request may close these issues.

Everything typed on client is in ALL CAPS (Wayland)

3 participants