v4.4.0
What's new
KeyUI
v4.4.0 (2026-11-15)
Full Changelog Previous Releases
- fix: keep keys from swallowing keypresses while KeyUI is open
Report on 4.4.0-beta4 (Forever 1.60.1): with KeyUI open, no keypress
reached the game for the first ~30 seconds.
Since 1b9e821 every key gets its OnKeyDown, OnMouseWheel and
OnGamePadButtonDown handlers at creation. If setting such a handler
leaves the frame taking that input, all keys swallowed keypresses (they
do not propagate). In locked mode the handler switched off only the key
that had just swallowed one, so input came back only after each key had
taken a press, or after the pointer had crossed the keys (OnLeave).
Nothing documents whether SetScript turns input on, so the fix does not
depend on it:- InstallKeyEditHandlers switches input off right after setting them
- addon:ReleaseKeyCapture() switches it off on every key except the one
hovered in edit mode; called on open, at combat start and when a device
leaves edit mode (Cancel or Save: the hovered key gets no OnLeave then) - /keyui report shows capture=<keys taking input> keypress=<on|off>
The harness now assumes setting an input handler turns that input on and
checks that no locked key takes input after opening, during and after an
edit session, in combat and in the report. Without the fix it reports 20
problems, with it none on all five clients.
Not tested in-game.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- docs: record the layout name checks for testers and the harness
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: ask before a save replaces another custom layout
Typing the name of an existing custom layout into the Save Layout dialog replaced that
layout without a word. Now KEYUI_LAYOUT_OVERWRITE asks first ("A Keyboard layout named
'%s' already exists. Replace it?", name passed as a format argument). Replace saves;
Cancel or ESC goes back to the name dialog, so the edits can be saved under another name
or cancelled.
Saving the custom layout that is being edited under its own name still replaces it
without asking, since that is the usual way to keep changes to it. "Being edited" means
it is the active layout, compared by content because layout_current and layout_edited
are separate tables after /reload.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: reopen a custom layout that shares a built-in layout's name
Players who saved a custom layout under a built-in layout's name before that was refused
still lost it on every /reload: addon:load() opens the active layout by name before the
layout menu exists, and generate_<device>_layout took the built-in table first.
layout_current_<device> keeps a copy of the layout that was active, so the lookup
(addon:ResolveLayoutByName) now takes the custom layout when it matches that copy and the
built-in one otherwise. No saved data is renamed or rewritten. The harness reopens KeyUI
as after /reload with such a pair, once with the custom and once with the built-in layout
active.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: keep custom layouts off the built-in layout names
A custom layout saved, renamed or copied under a built-in layout's internal name
("QWERTZ_100%", "Layout_4x3", "xbox") was replaced by the built-in layout the next time
KeyUI opened: addon:load() looks the active layout up by name before the layout menu
exists, and generate_<device>_layout prefers the built-in table.
Saving, renaming and copying now refuse those names with a chat line, and importing (and
the copy suggestion) picks "<name> (2)" instead. A refused name in the Save Layout dialog
keeps the dialog open; it used to close it and leave the device edited with nothing on
screen to save or discard the edits.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: record a saved layout as the current board
Saving a layout made it the current one in layout_current_<device> but left
key_bind_settings_<device>.currentboard on the layout picked before. Every other way to
pick a layout sets both, and RenameLayout only renames currentboard when it names the
renamed layout, so renaming a just-saved layout left currentboard pointing at a name
that was no longer current. The harness now saves a layout on each device.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - chore: settle the remaining luacheck warnings
No behaviour change. The only warnings that pointed at code were two fallbacks to globals
no client has any more: IsAddOnLoaded behind C_AddOns.IsAddOnLoaded and
ToggleAutoCastPetAction behind C_ActionBar.ToggleAutoCastPetAction. The namespaced
functions exist in all five GlobalAPI dumps, so the fallbacks never ran; they are gone.
The rest is tidying: the unused addon name from the file vararg (and the thirty
shadowing warnings it caused), unused locals, repeatedlocal text, an empty if branch,
and handle_drag_or_size/handle_release, which declared a parameter named self next to
the implicit one of the method.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - chore: lint with luacheck in CI
.luacheckrc checks KeyUI's own Lua with luacheck 1.2.0; pr-check.yml runs it as a
separate job. The part that matters is "accessing undefined variable": the WoW globals
KeyUI may read come from tools/luacheck/wow_globals.lua, generated by
tools/luacheck-globals.lua from the Blizzard resources of all five clients plus the
top-level definitions in their UI source. A name no client defines stays an error, and
the generator prints the names some client lacks so their guards can be checked.
Names that only the Blizzard_Deprecated* forwarders define are allowed in Core.lua and
Frames/ActionButton.lua, the two files that use them as fallbacks behind C_ActionBar.
The harness stand-in may set the globals it emulates, but not through allow_defined:
luacheck shares implicitly defined globals across the files of one run, which hid every
undefined global in the addon in a first attempt.
tools/update-api.sh fetches the extra resource files (FrameXML, Frames, Mixins,
LuaEnum, Events, GlobalStrings/enUS) and gains "resources" to refresh only those.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - docs: record today's snapshots, combat-only controls, popups and Classic atlases
Snapshot table at Retail 70783 and Forever 70938; both tab templates now
exist on every client; the controller glyph atlases are missing on
Anniversary and Classic Era; which controls refuse during combat; secret
strings and popup rules; what the harness now covers; tester checks for
the fixes since beta1; Forever in the supported versions and the TOC line.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: let layouts with a % in their name be deleted
The client formats every popup text with SetFormattedText (GameDialog.lua),
and the delete confirmation built its text by concatenating the layout
name. A name such as "50% keys" made the popup raise "invalid option"
instead of asking. The name is now passed as the popup's text argument.
Harness: popups format their text like the client; step 31c deletes a
layout named "50% keys".
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: record the selected custom layout as the current board
Selecting a default layout set key_bind_settings_<device>.currentboard,
selecting a custom one did not, so currentboard kept naming the previous
layout. RenameLayout relies on it to follow a renamed active layout.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: label controller keys with text where the client has no glyph atlas
Controller keys showed their Xbox, PlayStation or Steam Deck glyph through
|A:Gamepad_...|a markup on every client. Anniversary and Classic Era have
none of the Gamepad_* atlases (API/*/_resources/AtlasInfo.lua), and an
unknown atlas draws nothing, so those keys were blank there. The glyph is
now used only when C_Texture.GetAtlasInfo knows it (present on all five
clients, asked once per name); otherwise the key keeps its text label.
The three per-family branches became one lookup.
Harness: C_Texture.GetAtlasInfo models the missing atlases, and step 02
checks that no controller key shows markup for an unknown atlas.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: reject NaN and infinite numbers in imported layouts and settings
tonumber accepts "nan" and "inf", so a crafted or corrupted import string
can carry them, and NaN passes every < and > bound check. Layout
coordinates, sizes and icon sizes, and the font size setting, now have to
be finite numbers.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: refuse a settings reset or profile import during combat
Both close KeyUI and rebuild its frames, which parent secure buttons. Their
confirmation popups can still be accepted after a fight has begun: the
reset then hit blocked Hide/SetPoint calls, and the import replaced every
setting while the frames could not follow. The reset now does nothing in
combat (with the usual one chat line), the import reports
"Profiles can't be imported during combat."
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: pass the action count to SetText untouched
C_ActionBar.GetActionDisplayCount is SecretWhenCooldownsRestricted on
Retail and Forever, so in combat it returns a secret string. KeyUI wrote
GetActionDisplayCount(slot) or "", a boolean test on that string, which
tainted code may not do; with "Stay open in combat" every charge or stack
update could raise. The function is documented as never nil, and
FontString:SetText accepts secret values, so the result now goes to SetText
as is -- the same thing Blizzard's ActionButton UpdateCount does.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: give the profile and layout popups their own letter limit
Blizzard pools its popups and calls SetMaxLetters only for dialogs that
define maxLetters (GameDialog.lua, the same on all five clients), so a
limit of 24-77 letters left by a Blizzard dialog carried over: an imported
profile or layout string was cut and rejected as malformed, an export
could be cut, and names were shortened. Import/export popups now set
maxLetters = 0 (no limit), rename and copy MAX_LAYOUT_NAME_LENGTH.
Harness: the pooled popup starts with a 24-letter limit and applies
maxLetters the way the client does; step 31b exports a profile.
Fixes #72
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: leave the pinned modifier layer when Edit Layout clears the checkboxes
Edit Layout unticked Alt/Ctrl/Shift and cleared addon.modif, but never
rebuilt current_modifier_string, which every key lookup uses. With Shift
ticked, the keys kept showing (and clicking, and binding from the
right-click menu) the Shift layer during edit mode and after Save or
Cancel, while no checkbox was ticked. It now calls update_modifier_string
and refresh_keys after the reset.
Harness: the oracle takes the layer a checkbox pins (opts.layer); steps
32-35 tick Shift, open Edit Layout and cancel it.
Fixes #73
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: keep Stay-open-in-combat controls from making protected calls
With "Stay open in combat" on, four controls reached functions the client
refuses during combat lockdown and answered with ADDON_ACTION_BLOCKED:- the size slider (SetScale on frames that parent secure buttons)
- dragging the controller frame (StartMoving; keyboard and mouse frames
already checked InCombatLockdown) - dragging or Shift+click-removing a key in edit mode, and entering edit
mode at all - binding or unbinding a spell, macro or interface command from the
right-click menu (SetBinding/SaveBindings are #nocombat)
Each now checks addon:IsBlockedByCombat(), which prints one chat line per
fight. The slider snaps back to the current scale. handle_drag_or_size lost
its dead self.mouse_locked check (no key button has that field).
The harness stand-in now refuses StartMoving, StopMovingOrSizing,
SetBinding and SaveBindings in lockdown, records menu callbacks, and step
23b uses all four controls in combat.
Fixes #74
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- fix: call C_ActionBar instead of the deprecated action bar globals
Since 12.0.0 the bare action bar globals -- HasAction, GetActionTexture,
GetActionBarPage, GetBonusBarOffset, IsAttackAction, ... -- are only
forwarders to C_ActionBar in Blizzard_DeprecatedActionBar, and that file
is the same on all five clients, Classic included. It loads only while
the loadDeprecationFallbacks CVar is on, and Blizzard marks it "will be
removed at the next expansion". KeyUI drew every key icon through
HasAction/GetActionTexture: without the forwarders it raised at login
and every key stayed empty. The proc glow and the attack flash tested
their functions for existence and would just have stopped.
The CVar defaults to on today, so this is most likely not what the
tester saw, but it is the same "keys empty" failure waiting for the
next expansion (or anyone who turns the CVar off).
Core.lua and Frames/ActionButton.lua now bind file-local names to the
C_ActionBar functions, present in all five interface dumps; the global
remains only as a fallback. The forwarders pass arguments and results
straight through, so nothing else changes. On Classic, the spell menu
called IsSpellKnown, which is the same kind of forwarder
(Blizzard_DeprecatedSpellBook); it now makes the call that forwarder
makes, C_SpellBook.IsSpellInSpellBook(id, Player, false), keeping its
meaning.
The harness now leaves the forwarders out by default
(KEYUI_DEPRECATION_FALLBACKS=1 adds them) and opens the right-click
menu, so the spell menu path runs on every client too.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - docs: record the click attribute names, late icons, Alt+Z and the harness
COMPATIBILITY.md described the modifier layers as "shift-action" etc.,
the names that never worked. It now gives the "*"-suffixed names, the
GetAttribute lookup order that requires them, why "<prefix>type2" still
wins for right-clicks, that bindings are read fresh, how Alt+Z is told
apart from a close, the late-icon rule, and what tools/harness checks
and does not.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - ci: keep alpha and beta builds off WoWInterface
WoWInterface has no beta channel: whatever the packager uploads there
becomes the download for everyone. v4.4.0-beta1 reached all WoWI users
that way, while CurseForge and Wago correctly listed it as a beta.
For alpha and beta tags the channel step now sets PACKAGER_ARGS=-w 0,
which the packager reads as "no WoWInterface id" and skips that upload.
Full releases are unchanged.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - test: run KeyUI headless through a play session on all five clients
Nobody can test KeyUI in-game before a release, and v4.4.0-beta1 went
out with three regressions no syntax check could see. tools/harness
loads KeyUI under plain Lua 5.1 in a stand-in client and plays a fixed
session: open, modifiers, bar paging, bonus bar, slot and binding
changes, late icons, Bartender paging, Alt+Z, combat (staying open and
closing), reopening, the Controls window and /keyui report.
After every step each visible bound key is checked against what the
game state says it should show and what a click on it should use. Lua
errors and calls the client would block in combat count as failures.
The stand-in models what KeyUI's behaviour depends on: IsShown vs
IsVisible and OnShow/OnHide through ancestors, protected frames in
combat, Frame:GetAttribute(prefix, name, suffix) with its documented
lookup order, and secure click resolution. It does not model rendering
or secret values.
tools/harness/check.sh all five flavors, exit 1 on problems
tools/harness/check.sh diff [ref] per-step state, ref vs working tree
On v4.4.0-beta1 it reports 60 problems per client, on v4.3.1 80 (other
ones: modified right-clicks used actions, clicks kept the pre-combat
page). pr-check.yml now runs it after the syntax check.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - feat: /keyui report, one copyable line for bug reports
Testers report "the keys are empty or wrong" and nothing else. /keyui
report opens a popup with a single line to copy: KeyUI and client
version, open state and number of registered events, held modifiers,
bar page and bonus bar, loaded integrations, and per device the layout
and every bound key with its binding, slot, whether the slot holds an
action, whether the icon shows and which slot a plain left-click uses
(read the way the secure template reads it).
One line because the popup's edit box is single-line. The dialog sets
maxLetters = 0: Blizzard pools its popups and the last one's limit
(24 or 32 letters for its own dialogs) would otherwise cut the report.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: stay open when only UIParent hides (Alt+Z, cinematics)
Hiding UIParent fires OnHide on every KeyUI frame. The hooks took that
for a close: KeyUI marked itself closed, and since v4.4.0-beta1 a closed
KeyUI unregisters its events. When UIParent came back the keys came back
with it, frozen -- page changes, slot changes and modifiers no longer
reached them until KeyUI was toggled. v4.3.1 froze too (its flush
returned early while "closed"), just without dropping the events.
The OnHide hooks now skip the case where the frame itself is still
shown, which is exactly "only an ancestor was hidden".
Also: the controller artwork registers itself for ESC when it is built,
but ApplyEscClose never covered it, so turning ESC-close off still let
ESC hide the controller picture. It is now handled with the other
frames.
Found with the headless harness: after UIParent was hidden and shown,
switching to bar page 2 left every key on page 1.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: read each key's binding fresh instead of caching it
v4.4.0-beta1 cached key -> action ("ALT-CTRL-1" -> "ACTIONBUTTON1") and
dropped the cache only on UPDATE_BINDINGS / BINDINGS_LOADED. If any
change ever arrived without that event, the key kept showing its old
binding until the next one -- with nothing to recover from it, since
every refresh read the cache.
GetBindingAction is cheap and was never restricted in combat, so the
cache saved little. lookup_binding asks it directly again. The cache per
binding string (matched pattern, label) stays: it depends only on the
string and the pattern list and is dropped as before.
Found with the headless harness: a binding added without UPDATE_BINDINGS
stayed blank through every later refresh, while v4.3.1 showed it on the
next one.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: show icons that arrive after a key was drawn
Item and spell textures can be missing on the first query and arrive a
moment later, with no event that tells KeyUI. Up to v4.3.1 the next
ACTIONBAR_UPDATE_STATE rebuilt every key and picked the icon up.
v4.4.0-beta1 answers those state events with the light refresh_icons
pass, which skipped every key whose icon was hidden -- such a key stayed
empty until something rebuilt the whole layout.
refresh_icons now rebuilds a key whose icon is hidden when its source
has a texture by now (addon:IconBecameAvailable): the action slot, or
the spell or macro it is bound to. process_spell and process_macro
remember that source even when there was no icon yet.
Found with the headless harness: an item on slot 3 and a spell bound to
R whose textures arrive after opening stayed blank.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - fix: let Shift/Ctrl/Alt clicks use their own layer's action
A click on a KeyUI key with a modifier held used the action of the bare
layer. SyncSecureAttributes wrote the modifier layers as "shift-type" /
"shift-action", but the secure template looks attributes up with
GetAttribute(prefix, name, suffix), which tries prefix..name..suffix,
""..name..suffix, prefix..name.."", ""..name.."" and then name --
never prefix..name on its own. Those attributes were never read, and
every modified click fell through to "type"/"action". A layer with no
action ("Spell X" bindings, empty slots) used the bare layer's slot
instead of doing nothing.
The modified layers are now written as "shift-type*" / "shift-action*"
("shift-", any mouse button). The bare layer keeps "type"/"action", and
"<prefix>type2" = ATTRIBUTE_NOOP still wins for right-clicks because it
is the first name a right-click tries. The names are worked out once in
SECURE_MODIFIER_LAYERS and used by both InitSecureClickAttributes and
the sync.
Found with the headless harness (tools/harness): Shift+1 bound to
MULTIACTIONBAR1BUTTON1 clicked slot 1 instead of 61, in and out of
combat. Introduced in v4.4.0-beta1.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - Merge branch 'hotfix/4.3.2'
- fix: take key input only in edit mode; withdraw ESC at combat start
Key input:- Mouse and controller keys switched keyboard and wheel input on for every
hover. In combat that is a blocked call: EnableKeyboard, EnableMouseWheel
and EnableGamePadButton are protected functions on secure buttons. - After an edit session their OnKeyDown handler stayed installed, so a
keypress over a locked key renamed it and was swallowed. - Keyboard keys never switched input on when hovered, only once at creation.
Renaming a key by keypress in edit mode therefore failed on any key that
had been hovered before.
All three devices now take keyboard, wheel and gamepad input only while
hovered in edit mode, never during combat. The handlers are installed once
per key instead of on every hover.
ESC in combat: lockdown begins only after PLAYER_REGEN_DISABLED has been
handled (Clique and Bartender4 still write secure attributes there), so
ApplyEscClose asked InCombatLockdown() too early and left KeyUI's frames in
UISpecialFrames. With "Stay open in combat", ESC then hit a blocked Hide().
It now goes by KeyUI's own combat flag. Combat start also switches off
input on a key hovered in edit mode while that is still allowed.
Also: - remove the per-device "layout dirty" OnShow/OnHide handlers; Core
replaced them with SetScript, so all but one were dead, and the survivor
generated the mouse keys a second time after a profile import. Core now
hooks instead of replacing, which also brings back SetupButtonFade's
fade-out whenever a device frame appears - the tutorial probed for its arrow template by creating a frame on
UIParent each time and left it behind; it now asks GetTemplateInfo - the Controls window's close button discarded keyboard edits only and left
a mouse or controller layout stuck in edit mode - hide_all_frames no longer builds device frames just to hide them
Not yet tested in-game.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- Mouse and controller keys switched keyboard and wheel input on for every
- perf: redraw keys only when a binding or slot changes
State events that fire several times a second in combat
(ACTIONBAR_UPDATE_STATE, UPDATE_SHAPESHIFT_COOLDOWN/_USABLE,
PET_BAR_UPDATE_COOLDOWN/_USABLE) rebuilt every key with set_key. Blizzard's own
buttons only update state or cooldowns on them. KeyUI now does the same and
rebuilds keys only for structural changes (page, bonus bar, slot contents,
bindings, macros). A light icon pass re-reads textures for spell overrides
(SPELL_UPDATE_ICON, newly registered), macro conditions and form icons. It
also notices addon bars that page through their own state drivers
(Bartender, Dominos, ElvUI) and rebuilds only the key whose slot moved.
UPDATE_BINDINGS went through refresh_layouts, which rebuilds all key
geometry and is deferred during combat, so bindings changed in a fight
(Clique hover-cast, vehicles, other addons) only showed after it. It now
redraws just the keys whose binding differs, which also works in combat.
While closed (by default that includes every fight) KeyUI unregisters all
high-frequency events and pauses its flash OnUpdate. Page, held modifiers
and overlays are read again on opening.
Bindings and what KeyUI makes of each binding string (matched pattern,
label) are cached and dropped on UPDATE_BINDINGS. Reading bindings was never
restricted in combat; the cache saves work, it does not get around lockdown.
Clicks in combat: the secure "action" attribute could only be written out
of combat, so a Shift+click during a fight used the slot from before it.
With "Detect Modifier" on, all eight modifier layers are now written ahead
as prefixed attributes (shift-action, alt-ctrl-action, ...), which the
secure template picks by itself. Paging during combat still clicks the slot
from the last sync; see COMPATIBILITY.md.
Also:- every open created a new controller image frame and leaked the old one,
for all users, including those without a controller layout - key captions call SetFont only when the font changes
- closing a device frame without edits no longer rebuilds the layout
- the font settings now reach the key captions (RefreshLayout never existed)
Measured in a headless mock (119 keys, 50 combat frames of state events):
5950 key rebuilds before, 0 after; one binding change: 119 before, 1 after.
Not yet tested in-game.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- every open created a new controller image frame and leaked the old one,
- docs: list supported clients, Clique and all layouts; refresh API snapshots
The README named neither the game clients KeyUI runs on nor Clique, and its
layout list stopped at Azeron Cyborg II. It now lists all five clients, the
Clique integration, every keyboard layout family from the selector (Logitech
G13, Azeron Keyzen and Cyro, ZSA Moonlander, MoErgo Glove80, and the size
variants), and describes the mouse layouts as the generic side-button grids
they are.
COMPATIBILITY.md records the snapshots refreshed on 2026-11-03. The audit
still holds on all five clients; the Forever changes (secret
GetActiveLossOfControlData, IsSpellCrowdControl) touch nothing KeyUI calls.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com - ci: move actions/checkout to v7 (Node 24)
Every run warned that actions/checkout@v4 targets the deprecated Node.js 20
and is being forced onto Node.js 24. v7 runs on Node 24 natively. Nothing
here depends on what changed in between: v6 moved persisted credentials to a
separate file (the packager uses GITHUB_OAUTH, not git credentials) and v7
only blocks fork checkouts under pull_request_target and workflow_run, which
these workflows do not use.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
This mod has no additional files

