Skip to main content

ShortcutAction

Enum ShortcutAction 

pub enum ShortcutAction {
Show 65 variants Search, WorkspaceOverview, Lock, QuickSettings, ShortcutHelp, FocusPreviousWindow, FocusNextWindow, PreviousTab, NextTab, TabMenu, PreviousStrip, NextStrip, PreviousWorkspace, NextWorkspace, ToggleMaximize, MaximizeWindow, RestoreWindow, DetachTab, AttachTabLeft, AttachTabRight, MoveGroupLeft, MoveGroupRight, MoveGroupToPreviousStrip, MoveGroupToNextStrip, MoveGroupToPreviousDisplay, MoveGroupToNextDisplay, ResizeNarrower, ResizeWider, ReopenClosedTab, FocusGroup1, FocusGroup2, FocusGroup3, FocusGroup4, FocusGroup5, FocusGroup6, FocusGroup7, FocusGroup8, FocusGroup9, FocusStrip1, FocusStrip2, FocusStrip3, FocusStrip4, FocusStrip5, FocusStrip6, FocusStrip7, FocusStrip8, FocusStrip9, OpenFiles, OpenTerminal, ClipboardHistory, Notifications, ToggleFullscreen, ToggleMagnifier, MagnifierZoomIn, MagnifierZoomOut, PowerMenu, NextInputSource, EmojiPicker, AskAgent, SaySomething, ReportProblem, DictationToggle, DictationFinish, DictationCancel, ToggleFloat,
}
Expand description

A desktop action a shortcut can run.

Variants§

§

Search

§

WorkspaceOverview

§

Lock

§

QuickSettings

§

ShortcutHelp

A physical question-mark press reports the shifted slash key plus Shift, so the default is that chord rather than a bare slash.

§

FocusPreviousWindow

§

FocusNextWindow

§

PreviousTab

§

NextTab

§

TabMenu

Show the focused tab’s shell context menu.

§

PreviousStrip

§

NextStrip

§

PreviousWorkspace

§

NextWorkspace

§

ToggleMaximize

§

MaximizeWindow

Maximize the focused window group; nothing when it already is.

§

RestoreWindow

Restore the focused window group from maximized; nothing when it is not maximized.

§

DetachTab

§

AttachTabLeft

§

AttachTabRight

§

MoveGroupLeft

§

MoveGroupRight

§

MoveGroupToPreviousStrip

Carry the focused window group, whole, into the strip above.

§

MoveGroupToNextStrip

Carry the focused window group, whole, into the strip below.

§

MoveGroupToPreviousDisplay

Move the focused window group onto the display to the left of its own (the previous one in reading order).

§

MoveGroupToNextDisplay

Move the focused window group onto the display to the right of its own (the next one in reading order). Super+Shift+arrows already reorder within a display; Ctrl widens the gesture to its neighbour.

§

ResizeNarrower

§

ResizeWider

§

ReopenClosedTab

Bring back the most recently closed tab in the current workspace.

§

FocusGroup1

Focus the Nth window group of the current strip (Ctrl+Super+1 … Ctrl+Super+9).

§

FocusGroup2

§

FocusGroup3

§

FocusGroup4

§

FocusGroup5

§

FocusGroup6

§

FocusGroup7

§

FocusGroup8

§

FocusGroup9

§

FocusStrip1

Go to the Nth strip of the workspace, counting from the top (Super+1 … Super+9).

§

FocusStrip2

§

FocusStrip3

§

FocusStrip4

§

FocusStrip5

§

FocusStrip6

§

FocusStrip7

§

FocusStrip8

§

FocusStrip9

§

OpenFiles

§

OpenTerminal

§

ClipboardHistory

§

Notifications

§

ToggleFullscreen

§

ToggleMagnifier

§

MagnifierZoomIn

§

MagnifierZoomOut

§

PowerMenu

§

NextInputSource

Switch to the next keyboard input source.

§

EmojiPicker

Open the emoji picker over the focused text field.

§

AskAgent

Ask an agent about what is selected in the focused window, in the quick composer seeded with that selection.

§

SaySomething

Say something beside the pointer, to the people in the window under it (cursor chat), wherever the keyboard is; a bare “/” opens it only where the focused widget takes no text.

§

ReportProblem

Point at what is not working and report it (the feedback picker).

§

DictationToggle

§

DictationFinish

§

DictationCancel

§

ToggleFloat

Lift the focused window above the desk, or put it back into its strip.

Implementations§

§

impl ShortcutAction

pub fn serialize<__S>( __self: &ShortcutAction, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

§

impl<'de> ShortcutAction

pub fn deserialize<__D>( __deserializer: __D, ) -> Result<ShortcutAction, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

§

impl ShortcutAction

pub const ALL: [ShortcutAction; 65]

Every rebindable desktop action, in the order it is listed.

pub const fn id(self) -> &'static str

Stable id, as the action door and the Fluent keys spell it.

pub fn from_id(id: &str) -> Option<ShortcutAction>

The action id names.

pub fn label_key(self) -> String

Fluent key of what this action is called.

pub const fn action(self) -> Option<(&'static str, &'static str)>

The action that does what this shortcut does, as the provider that publishes it and its id within that provider, when the shell publishes one.

This is the one table a chord and an action share: the overlay host runs a chord by running this action, so a key, a palette click and an agent’s invocation cannot drift into three behaviours, and the shortcut guide, Settings and the palette name the action beside the chord. A shortcut whose action the shell does not publish yet is None, and its chord runs the shell’s own implementation.

pub const fn home(self) -> ShortcutHome

Which side of the desktop carries this shortcut out (ShortcutHome): its own windows and strips, or the session under them the device, its surfaces and its people.

pub const fn category(self) -> ShortcutCategory

What part of the desktop the shortcut belongs to; Settings groups by it.

§

impl ShortcutAction

pub fn focus_group_index(self) -> Option<usize>

The strip position a FocusGroupN action selects, counting from 0.

pub fn focus_strip_index(self) -> Option<usize>

The strip a FocusStripN action goes to, counting from 0 at the top.

Trait Implementations§

§

impl Clone for ShortcutAction

§

fn clone(&self) -> ShortcutAction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ShortcutAction

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ShortcutAction

§

fn deserialize<D>( deserializer: D, ) -> Result<ShortcutAction, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for ShortcutAction

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for ShortcutAction

§

fn cmp(&self, other: &ShortcutAction) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for ShortcutAction

§

fn eq(&self, other: &ShortcutAction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for ShortcutAction

§

fn partial_cmp(&self, other: &ShortcutAction) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl Serialize for ShortcutAction

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for ShortcutAction

§

impl Eq for ShortcutAction

§

impl StructuralPartialEq for ShortcutAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

§

impl<T> AsAny for T
where T: 'static,

§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> CommonTraits for T
where T: AsAny + Any + Debug + WasmNotSendSync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T

§

impl<T> WasmNotSync for T
where T: Sync,