MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / set_key_action

Method set_key_action

src/controls.rs:304–310  ·  view source on GitHub ↗

Set the key used for a key action. Passing `None` disables the key action.

(&mut self, action: KeyAction, key: Option<keyboard::Key>)

Source from the content-addressed store, hash-verified

302 ///
303 /// Passing `None` disables the key action.
304 pub fn set_key_action(&mut self, action: KeyAction, key: Option<keyboard::Key>) -> &mut Self {
305 self.remove_key_action(action);
306 if let Some(key) = key {
307 self.bind_key(key, action);
308 }
309 self
310 }
311
312 /// Bind the four arrow keys to pan by the given fraction of the visible span.
313 pub fn bind_arrow_pan(&mut self, fraction: f64) -> &mut Self {

Callers

nothing calls this directly

Calls 2

remove_key_actionMethod · 0.80
bind_keyMethod · 0.80

Tested by

no test coverage detected