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 Keymap
pub fn bind( &mut self, key: KeyCode, modifiers: KeyModifiers, command: Command, ) -> &mut Keymap
綁定快捷鍵到命令
Sourcepub fn unbind(&mut self, key: KeyCode, modifiers: KeyModifiers) -> &mut Keymap
pub fn unbind(&mut self, key: KeyCode, modifiers: KeyModifiers) -> &mut Keymap
解除快捷鍵綁定
Sourcepub fn bind_selection(
&mut self,
key: KeyCode,
modifiers: KeyModifiers,
command: Command,
) -> &mut Keymap
pub fn bind_selection( &mut self, key: KeyCode, modifiers: KeyModifiers, command: Command, ) -> &mut Keymap
在選擇模式下綁定快捷鍵
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