Skip to content

Ignore vendor hotkey keyboard devices - #9129

Merged
omarchybot merged 7 commits into
omacom:quattrofrom
yashranaway:fix/filter-vendor-hotkey-keyboards
Oct 31, 2026
Merged

omarchybot merged 7 commits into
omacom:quattrofrom
yashranaway:fix/filter-vendor-hotkey-keyboards

Conversation

@yashranaway

@yashranaway yashranaway commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Keeps the keyboard-layout widget attached to a keyboard users can type on. Fixes #8964.

<<<< AI wording below >>>>

Problem

Hyprland reports vendor WMI hotkeys and wireless radio controls as keyboards. The widget may select one first, update its layout, and leave the real keyboard unchanged.

Fix

Exclude vendor WMI hotkeys and wireless radio controls from both the keyboard list and activelayout event names. Events from those devices cannot replace the last real keyboard used for widget selection.

Verification

bash test/shell.d/keyboard-layout-test.sh passes. Changed Bash files pass syntax checks and git diff --check passes.

@yashranaway
yashranaway marked this pull request as ready for review September 12, 2026 14:05
@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 652c0cb by Claude Opus 5.5. No second opinion: omabot review refused because the day's review budget was spent, so this review is one model's reasoning.

Since this was opened, #10670 changed the click to move every device holding the layout list, so the symptom in #8964 (a click leaves the real keyboard alone) no longer happens on a settled seat. What this pull request still fixes is the reading. I tested that on a worker running quattro, with uinput devices named acer-wireless-radio-control and acer-wmi-hotkeys and kb_layout = us,pl:

  • Every device on the same layout: a click moves the keyboard and the label follows, on quattro and on this branch alike.
  • After a click to Polish, then Alt+Alt back to English on the keyboard, then a shell restart: on quattro the reading picks acer-wireless-radio-control (furthest along), the label says Polish while the keyboard types English, and the next click sends every device to English, so the keyboard does not move. On this branch the reading picks the keyboard, the label says English, and the click moves it to Polish.

It also drops the two devices from keyboardCount, so a laptop whose only real keyboard is the built-in one stops running the ten-second hyprctl devices poll. The one-line regex is proportionate to that, and it matches Framework's …-wireless-radio-control and dell-wmi-hotkeys as well.

Tests on the worker: keyboard-layout-test.sh (42 passed) and hyprland-keyboard-layout-test.sh (7 passed). ./test/cli fails on vscode generated theme references current theme file, and quattro fails the same test, so it is not caused by this change.

#12350 (Apple SMC power/lid) and #6834 (T2 headset) edit the same regex line, so whichever lands second needs a rebase.

Labelled verified. It is not ready until a second opinion has reviewed this head and the suite passes, which is waiting on the next run and on that quattro failure being fixed.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Keeps vendor WMI hotkeys and wireless radio controls out of keyboard selection.

  • The keyboard widget skips vendor hotkeys and radio controls.

Reviews (4) · Last reviewed commit: "Merge quattro into fix/filter-vendor-hot..." · Reviewed by Greptile

@yashranaway

Copy link
Copy Markdown
Contributor Author

Checked the pushed keyboard-label filtering on current quattro; the keyboard layout regression passes.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 1, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed again at 7b45197, which adds eventKeyboardName rejecting every name isTypedKeyboard rejects, not only hl-virtual-keyboard. Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium.

The new commit is sound. selectKeyboard only ever matches the remembered name against typed keyboards, so an activelayout naming a power button or a vendor hotkey device could never be selected. All it could do was overwrite the last real keyboard's name and push the reading back onto layout progress. Now that name is kept. On a worker, key presses from uinput acer-wireless-radio-control and acer-wmi-hotkeys devices raise no activelayout at all. Those devices only raise one when something runs switchxkblayout on them, as the widget's click does.

I repeated the reproduction at this head on a worker. The seat had uinput acer-wmi-hotkeys, acer-wireless-radio-control and a keyboard, with kb_layout = us,pl. I clicked to Polish, then pressed Alt+Alt back to English on the keyboard, then took a fresh reading of Hyprland's device list. quattro's model reads acer-wmi-hotkeys (Polish), and its next click sends every device to English, so the keyboard stays put. This branch's model reads the keyboard (English), and the click moves it to Polish. The VM's two idle QEMU keyboards were left out of that list, to match a laptop with one keyboard. As Codex pointed out, the wrong reading needs a reading with no remembered keyboard name, such as after a shell restart.

Tests on the worker:

  • keyboard-layout-test.sh: 44 passed on this branch, and fails with the model reverted to quattro's.
  • hyprland-keyboard-layout-test.sh: 7 passed.
  • ./test/cli: fails only on vscode generated theme references current theme file. quattro at f45461a fails the same test, so this change does not cause it.

Codex Medium found no defect in the diff. Its agreement is not guaranteed independent, because it can read this review's working notes.

Still labelled verified. It is not ready until the suite passes on a worker, so it is waiting on that quattro failure being fixed. Nothing is needed from the author.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 12, 2026
quattro added the keyboard widget's table-loading test at the end of keyboard-layout-test.sh, where this branch added its event assertions. Both are kept, the branch's first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 12, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had stopped merging cleanly, so I merged quattro into the branch as a27a4d8. The only conflict was in test/shell.d/keyboard-layout-test.sh, where quattro's new table-loading test and this branch's eventKeyboardName assertions were both added at the end of the file. Both are kept, and the code change against quattro is unchanged. Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium.

I checked quattro's two newer commits to the keyboard widget (#15043 and #14433) for interaction with this change. They add no new caller of isTypedKeyboard or eventKeyboardName, and the click still moves every device holding the layout list, so the change does the same thing it did before the merge.

I then verified it again at a27a4d8 on a worker running the shell from this branch. The seat had uinput acer-wmi-hotkeys, acer-wireless-radio-control and a keyboard, with kb_layout = us,pl. I moved every device to Polish, moved the keyboard alone back to English, and read Hyprland's device list. quattro's model reads acer-wmi-hotkeys (Polish), and this branch's model reads the keyboard (English). keyboard-layout-test.sh passes (71) and fails with quattro's model put back. hyprland-keyboard-layout-test.sh passes (20), and the full ./test/cli suite is green.

Codex Medium checked the merge resolution, the regex and the newer quattro commits and found no defects. It also got the same device selection when it replayed the scenario. That agrees with my conclusion, but its independence is not guaranteed.

Nothing is left for the author. This waits on the maintainer.

@omarchybot
omarchybot merged commit 0ca79f2 into omacom:quattro Oct 31, 2026
1 check passed
omarchybot added a commit to notabene00/omarchy that referenced this pull request Nov 1, 2026
omacom#9129 landed the same eventKeyboardName change this branch makes and added vendor WMI hotkey and radio-control devices to UNTYPED_KEYBOARDS. Keep both: the regex now names apple-smc-power beside the ACPI buttons and keeps quattro's suffix match, and the tests keep both sets of assertions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to vincent-peng/omarchy that referenced this pull request Nov 1, 2026
omacom#9129 landed on quattro with its own extension of UNTYPED_KEYBOARDS (vendor -wmi-hotkeys and -wireless-radio-control suffixes). Both patterns are combined so neither set of devices is dropped, and both sets of tests are kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to vincent-peng/omarchy that referenced this pull request Nov 1, 2026
omacom#9129 added vendor -wmi-hotkeys and -wireless-radio-control devices to the bar's filter only, so indicator.py's copy, which says it is the same list, would still let an Acer or ASUS hotkey block drive the Super+I pick.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
* Ignore vendor hotkey keyboard devices

* Ignore vendor hotkey layout events

---------

Co-authored-by: Omarchybot <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 0ca79f2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Make Omarchy work better on everything! ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

keyboard-layout widget switches the wrong device on laptops with vendor WMI/radio-control inputs

3 participants