keyboard, hyprland/ipc: keyboard layout handling - #923
Open
brainrom wants to merge 3 commits into
Open
Conversation
brainrom
force-pushed
the
feat-keyboard-layout
branch
from
July 24, 2026 17:55
c2468c1 to
2dfe82d
Compare
Some dispatchers doesn't have Lua equivalents, so the don't get through Hyprland Lua/legacy dispatcher. This allows to mimick hyprctl behvaior.
brainrom
force-pushed
the
feat-keyboard-layout
branch
from
July 24, 2026 18:13
2dfe82d to
63f7623
Compare
brainrom
force-pushed
the
feat-keyboard-layout
branch
from
July 24, 2026 18:59
63f7623 to
d122fb2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds keyboard layout support to the Hyprland backend, inspired by the equivalent Waybar module.
Problem
QuickShell had no way to query or switch keyboard layouts under Hyprland or any other environment. Users who wanted a layout indicator or switcher had to resort to external tools.
Solution
Two new components:
Quickshell.Keyboard(src/keyboard/) — A compositor-agnosticKeyboardLayoutdata class that resolves xkb layout names vialibxkbregistry. Can be reused by future compositor backends (Sway, etc.) since the layout model is the same regardless of the compositor.HyprlandKeyboard(Quickshell.Hyprland._Ipc) — Hyprland-specific keyboard device representation. Maintains anObjectModel<KeyboardLayout>of available layouts, tracks the active one, and exposescycleLayout()/switchToLayout(index)for switching.Commits
The change is split into three commits, each independently reviewable:
keyboard: new module for keyboard layouts (data class)Quickshell.Keyboardmodule with the sharedKeyboardLayoutclass and xkbregistry resolution logic.hyprland/ipc: make dispatch prefix in dispatch() optionalswitchxkblayout) without thedispatchprefix, mirroringhyprctlbehavior, sinceswitchxkblayoutisn't available through Hyprland's Lua/legacy dispatcher.hyprland/ipc: keyboard layout handlingHyprlandKeyboarddevice tracking,j/devicesparsing,activelayoutevent handling, and layout switching viaswitchxkblayout.QML API additions
Checklist
module.mdfor new module added, new files added to correspondingmodule.md, docs tested