E117
Error
Syntax and structure
E117 — A key combination no keyboard sends
on key(…) names modifiers (ctrl, shift, alt, meta) and one key; a modifier it does not know, no key, or a key no keyboard has would never match.
What the compiler said
error[E117]: `on key("ctrl+shfit+k")` names `shfit`, which is not a modifier --> src/App.wf:2:12 | 2 | on key("ctrl+shfit+k") { log("search") } | ^ = help: Modifiers `mod` (⌘ on a Mac, Ctrl elsewhere), `ctrl`, `shift`, `alt`, `meta` (`cmd`), then one key: a letter, a digit, or a name like `Enter`, `Escape`, `ArrowDown`, `Tab`, `F2`; a chord is its steps with a space between, `mod+k mod+s` = docs: https://webfluent.monzeromer.dev/errors/E117
The fix
Broken
page P(path: "/", title: "T", description: "D") {
on key("ctrl+shfit+k") { log("search") }
Heading("Search").h1
}
Fixed
page P(path: "/", title: "T", description: "D") {
on key("ctrl+shift+k") { log("search") }
Heading("Search").h1
}
Modifiers mod (⌘ on a Mac, Ctrl elsewhere — the one for an
app's shortcuts), ctrl, shift, alt, meta (or cmd), then one key:
a letter, a digit, or a name — Enter, Escape, ArrowDown, Tab, F2,
inline-start. A chord is its steps with a space between: mod+k mod+s.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints cannot lower it: it would ship a broken page.