Skip to content

keyboard: improve live session layout handling - #220

Merged
ptr1337 merged 6 commits into
cachyosfrom
keyboard-fixes
May 17, 2026
Merged

keyboard: improve live session layout handling#220
ptr1337 merged 6 commits into
cachyosfrom
keyboard-fixes

Conversation

@ptr1337

@ptr1337 ptr1337 commented May 9, 2026

Copy link
Copy Markdown
Member

and a lot of fixes

@ptr1337 ptr1337 self-assigned this May 9, 2026
@ptr1337 ptr1337 added the enhancement New feature or request label May 9, 2026
Comment thread src/modules/keyboard/keyboard.conf

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts keyboard layout handling with a focus on live-session behavior (group switching, KWin/Gnome integration), and tightens how layout/variant lists are generated when an extra ASCII-capable layout is added.

Changes:

  • Refactors group-switcher option selection into a shared helper and reuses it across XKB/locale1/KWin/Gnome apply paths.
  • Improves KWin kxkbrc rewriting by ensuring keys are written under a [Layout] group (creating it if needed) and supporting writing Options= / Use=true.
  • Updates keyboard module configuration/schema: adds configure.gnome, and changes the sample config defaults for useLocale1 and configure.kwin.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/modules/keyboard/SetKeyboardLayoutJob.cpp Adds variantList() helper to better handle variants when additional layouts are (not) present.
src/modules/keyboard/Config.cpp Refactors group-switcher determination; expands KWin config rewriting; adjusts cancel/apply configuration logic.
src/modules/keyboard/keyboard.schema.yaml Extends schema with configure.gnome.
src/modules/keyboard/keyboard.conf Updates sample configuration defaults (useLocale1, configure.kwin).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/keyboard/Config.cpp Outdated
Comment thread src/modules/keyboard/SetKeyboardLayoutJob.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread src/modules/keyboard/Config.cpp
Comment thread src/modules/keyboard/Config.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment on lines +397 to +400
if ( !options.isEmpty() )
{
setLayoutKey( content, QStringLiteral( "Options=" ), options );
}
@ptr1337
ptr1337 merged commit 94fcc8b into cachyos May 17, 2026
4 checks passed
@ptr1337
ptr1337 deleted the keyboard-fixes branch May 17, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants