pub struct KeyNav {
pub vim: bool,
pub horizontal: bool,
pub grid: bool,
}Expand description
How a list reads keys: the arrows always, and optionally the vim bindings on top.
vim is off by default because a list that swallows j cannot also be typed into, and hyprshell’s biggest
list — the launcher — is a search field. A surface with no text input can turn it on freely; one with a
field should only do so if its user asked for it.
Fields§
§vim: bool§horizontal: boolThe list runs along the screen’s horizontal, so Left/Right move it rather than Up/Down.
grid: boolThe list wraps into rows, so it uses both pairs of arrows: Left/Right for one tile and Up/Down for a whole row. Only a grid can, which is why it is a mode rather than the default.
Implementations§
pub fn horizontal(self) -> Self
Sourcepub fn grid(self) -> Self
pub fn grid(self) -> Self
A grid: tiles run along a row, so Left/Right step one and Up/Down step a row.
Sourcepub fn interpret(self, key: &Key) -> Option<KeyNavMove>
pub fn interpret(self, key: &Key) -> Option<KeyNavMove>
What key asks the list to do, or None when it is not a navigation key — which is the important half
of the contract: everything this returns None for must still reach a focused text field as typing.