pub struct InputOptions {
pub line_scroll_speed: f32,
pub scroll_zoom_speed: f32,
pub max_click_dist: f32,
pub max_click_duration: f64,
pub max_double_click_delay: f64,
pub zoom_modifier: Modifiers,
pub horizontal_scroll_modifier: Modifiers,
pub vertical_scroll_modifier: Modifiers,
}
Expand description
Options for input state handling.
Fields§
§line_scroll_speed: f32
Multiplier for the scroll speed when reported in crate::MouseWheelUnit::Line
s.
scroll_zoom_speed: f32
Controls the speed at which we zoom in when doing ctrl/cmd + scroll.
max_click_dist: f32
After a pointer-down event, if the pointer moves more than this, it won’t become a click.
max_click_duration: f64
If the pointer is down for longer than this it will no longer register as a click.
If a touch is held for this many seconds while still, then it will register as a “long-touch” which is equivalent to a secondary click.
This is to support “press and hold for context menu” on touch screens.
max_double_click_delay: f64
The new pointer press must come within this many seconds from previous pointer release for double click (or when this value is doubled, triple click) to count.
zoom_modifier: Modifiers
When this modifier is down, all scroll events are treated as zoom events.
The default is CTRL/CMD, and it is STRONGLY recommended to NOT change this.
horizontal_scroll_modifier: Modifiers
When this modifier is down, all scroll events are treated as horizontal scrolls,
and when combined with Self::zoom_modifier
it will result in zooming
on only the horizontal axis.
The default is SHIFT, and it is STRONGLY recommended to NOT change this.
vertical_scroll_modifier: Modifiers
When this modifier is down, all scroll events are treated as vertical scrolls,
and when combined with Self::zoom_modifier
it will result in zooming
on only the vertical axis.
Implementations§
Trait Implementations§
Source§impl Clone for InputOptions
impl Clone for InputOptions
Source§fn clone(&self) -> InputOptions
fn clone(&self) -> InputOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more