pub fn move_slider_on_keys(
keys: MessageReader<'_, '_, KeyPressed>,
tracker: Res<'_, FocusTracker>,
sliders: Query<'_, '_, &mut SliderValue>,
out: MessageWriter<'_, SliderChanged>,
)Expand description
Keyboard control for a focused <slider>. Reads the raw
KeyPressed bus directly rather than FocusedKey - the same
pattern lumen_primitives::tabs::dispatch_tab_keys uses for its
roving-tabindex nav - since a slider isn’t a TextInput and doesn’t
need the extra dispatch_focused_keys routing hop.
ArrowLeft/ArrowDown: decrement by one step.ArrowRight/ArrowUp: increment by one step.PageDown/PageUp(forwarded by the winit backend asKey::Character("PageDown"/"PageUp")- there’s no dedicatedNamedKeyvariant for them yet): move by ten steps.Home/End: jump tomin/max.
Step comes from SliderValue::step_size: the authored step
attribute, or (max - min) / 100 - matching the
<input type=range> browser default of 100 discrete positions.