pub enum Shortcut {
Show 16 variants
Copy,
Paste,
Cut,
Undo,
Redo,
SelectAll,
Find,
Save,
BrowserBack,
BrowserForward,
NewTab,
CloseTab,
ReopenTab,
NextTab,
PrevTab,
ReloadPage,
}Expand description
A named shortcut whose chord is the same concept on every OS but not the same keys.
Each backend owns a Shortcut -> KeyCombo table (plus, for the couple of
shortcuts a given OS has no ordinary chord for, a small override) rather
than sharing one table — see the per-backend combo/press_shortcut.
Variants§
Copy
Copy the selection.
Paste
Paste from the clipboard.
Cut
Cut the selection.
Undo
Undo the last action.
Redo
Redo the last undone action.
SelectAll
Select all content.
Find
Open find/search.
Save
Save the current document.
BrowserBack
Navigate backward in browser history.
BrowserForward
Navigate forward in browser history.
NewTab
Open a new tab.
CloseTab
Close the current tab.
ReopenTab
Reopen the last closed tab.
NextTab
Switch to the next tab.
PrevTab
Switch to the previous tab.
ReloadPage
Reload the current page.
Implementations§
Source§impl Shortcut
impl Shortcut
Sourcepub const ALL: &'static [Shortcut] = <Shortcut as strum::VariantArray>::VARIANTS
pub const ALL: &'static [Shortcut] = <Shortcut as strum::VariantArray>::VARIANTS
Every named shortcut, in declaration order.
#[derive(strum::VariantArray)] generates this straight from the
enum’s variant list at compile time, so it cannot go stale the way a
hand-written array literal could: there is no second, independently
editable list for it to drift from — a variant that’s missing here
would mean the enum itself doesn’t have it. The single shared
iteration source for each backend’s Shortcut -> KeyCombo
table-completeness test.
Trait Implementations§
impl Copy for Shortcut
impl Eq for Shortcut
impl StructuralPartialEq for Shortcut
Auto Trait Implementations§
impl Freeze for Shortcut
impl RefUnwindSafe for Shortcut
impl Send for Shortcut
impl Sync for Shortcut
impl Unpin for Shortcut
impl UnsafeUnpin for Shortcut
impl UnwindSafe for Shortcut
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.