Expand description
From an iced key event to a hyprforge_keys::KeyPress.
The one adapter between the toolkit and the suite’s keyboard grammar,
and the reason hyprforge-keys itself can stay free of iced: a crate
that only describes what a binding is should not need a GUI toolkit
to compile, and its tests should not need a window.
It lives here rather than behind an optional feature on that crate
because a feature would not stay optional. Cargo unifies features
across the workspace, so any build containing one app would switch
iced on for every other consumer — the trap the root Cargo.toml
documents twice already. This crate is the iced layer, so nothing
is smuggled in by putting the adapter in it.
Entirely action-agnostic: it knows which keys exist, not what any of them do. That is why the file manager and the image viewer can share it despite binding completely different things.
Functions§
- key_
press - One iced key press, as the keymap reads it — or
Nonefor a key no binding can name.