Skip to main content

KeyBindingExt

Trait KeyBindingExt 

Source
pub trait KeyBindingExt<This>
where This: NavigationStateAlg,
{ // Required methods fn page_bindings(&self) -> impl Iterator<Item = ManagerKeyBinding<This>>; fn keystroke_meaning( &self, stroke: Keystroke, ) -> Option<ManagerKeyBinding<This>>; fn typed_meaning(&self, typed: char) -> Option<ManagerKeyBinding<This>>; fn paste_meaning(&self, text: &str) -> Option<ManagerKeyBinding<This>>; fn page_accepts_text(&self) -> bool; fn action_keys( &self, action: ManagerAction, ) -> impl Iterator<Item = Keystroke>; }
Expand description

States the keys one page binds and what they denote there.

Required Methods§

Source

fn page_bindings(&self) -> impl Iterator<Item = ManagerKeyBinding<This>>

States every keystroke the current page binds, cursor movement first.

Typed scalars are not bound here: on an editor page every scalar the table leaves free denotes insertion, which is one rule rather than one binding per character.

Source

fn keystroke_meaning( &self, stroke: Keystroke, ) -> Option<ManagerKeyBinding<This>>

States what one keystroke denotes on the current page.

Exit is bound on every page. Any other modified keystroke denotes nothing, so a chord the terminal reports is never mistaken for the unmodified key inside it.

Source

fn typed_meaning(&self, typed: char) -> Option<ManagerKeyBinding<This>>

States what one typed scalar denotes on the current page.

Source

fn paste_meaning(&self, text: &str) -> Option<ManagerKeyBinding<This>>

States what pasted text denotes on the current page.

Source

fn page_accepts_text(&self) -> bool

Observes whether the current page holds a text draft free scalars belong to.

Source

fn action_keys(&self, action: ManagerAction) -> impl Iterator<Item = Keystroke>

States the keys reaching one action on the current page, the primary key first.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<This> KeyBindingExt<This> for This
where This: NavigationStateAlg,

States the keys one page binds and what they denote there.