pub enum Action {
    SetView(String),
    LockView {
        lock: String,
        unlock: String,
        latches: bool,
        looks_locked_from: Vec<String>,
    },
    ApplyModifier(Modifier),
    Submit {
        text: Option<CString>,
        keys: Vec<KeySym>,
    },
    Erase,
    ShowPreferences,
}
Expand description

Action to perform on the keypress and, in reverse, on keyrelease

Variants

SetView(String)

Switch to this view

LockView

Fields

lock: String
unlock: String

When unlocked by pressing it or emitting a key

latches: bool

Whether key has a latched state that pops when another key is pressed.

looks_locked_from: Vec<String>

Should take on locked appearance whenever latch comes back to those views.

Switch to a view and latch

ApplyModifier(Modifier)

Hold this modifier for as long as the button is pressed

Submit

Fields

text: Option<CString>

Text to submit with input-method. If None, then keys are to be submitted instead.

keys: Vec<KeySym>

The key events this symbol submits when submitting text is not possible

Submit some text

Erase

Erase a position behind the cursor

ShowPreferences

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.