errors and warnings / stdlib / W8354
W8354 warning
Binding default key ignored on a flavor without default-key support
- area
- stdlib (x8xxx)
- fails the build
- with --deny-warnings
The default option of @binding sets the key a binding gets by default,
but the targeted clients have no support for default keys in Bindings.xml
(no client in the flavor table declares it yet), so the key is ignored. The
binding itself works; players bind a key in the Key Bindings UI. Remove
default, or keep it for clients that support it later. The module never
calls SetBinding for the player.
Example
import binding from "wowlua:bindings" @binding("MYADDON_TOGGLE", { label = "Toggle window", default = "CTRL-T" })local function toggleWindow() print("toggle")endimport binding from "wowlua:bindings" @binding("MYADDON_TOGGLE", { label = "Toggle window" })local function toggleWindow() print("toggle")endThe compiler reports it like this:
warning[W8354]: the default key `CTRL-T` of `MYADDON_TOGGLE` is ignored: no targeted client supports default keys ┌─ src/main.wowlua:3:65 │ 3 │ @binding("MYADDON_TOGGLE", { label = "Toggle window", default = "CTRL-T" }) │ ^^^^^^^^ no default key there
Offline
$ wowlua explain W8354 W8354 (warning): Binding default key ignored on a flavor without default-key support