pub struct Keymap { /* private fields */ }Expand description
可自訂的快捷鍵對映
Implementations§
Source§impl Keymap
impl Keymap
Sourcepub fn bind(
&mut self,
key: KeyCode,
modifiers: KeyModifiers,
command: Command,
) -> &mut Self
pub fn bind( &mut self, key: KeyCode, modifiers: KeyModifiers, command: Command, ) -> &mut Self
綁定快捷鍵到命令
Sourcepub fn unbind(&mut self, key: KeyCode, modifiers: KeyModifiers) -> &mut Self
pub fn unbind(&mut self, key: KeyCode, modifiers: KeyModifiers) -> &mut Self
解除快捷鍵綁定
Sourcepub fn bind_selection(
&mut self,
key: KeyCode,
modifiers: KeyModifiers,
command: Command,
) -> &mut Self
pub fn bind_selection( &mut self, key: KeyCode, modifiers: KeyModifiers, command: Command, ) -> &mut Self
在選擇模式下綁定快捷鍵
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keymap
impl RefUnwindSafe for Keymap
impl Send for Keymap
impl Sync for Keymap
impl Unpin for Keymap
impl UnwindSafe for Keymap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more