Enum egui_file_dialog::KeyBinding 
source · pub enum KeyBinding {
    Key(Key),
    KeyboardShortcut(KeyboardShortcut),
    PointerButton(PointerButton),
    Text(String),
}Expand description
Defines a keybinding used for a specific action inside the file dialog.
Variants§
Key(Key)
If a single key should be used as a keybinding
KeyboardShortcut(KeyboardShortcut)
If a keyboard shortcut should be used as a keybinding
PointerButton(PointerButton)
If a pointer button should be used as the keybinding
Text(String)
If a text event should be used as the keybinding.
Implementations§
source§impl KeyBinding
 
impl KeyBinding
sourcepub fn keyboard_shortcut(modifiers: Modifiers, logical_key: Key) -> Self
 
pub fn keyboard_shortcut(modifiers: Modifiers, logical_key: Key) -> Self
Creates a new keybinding where a keyboard shortcut is used.
Creates a new keybinding where a pointer button is used.
sourcepub fn pressed(&self, ctx: &Context, ignore_if_any_focused: bool) -> bool
 
pub fn pressed(&self, ctx: &Context, ignore_if_any_focused: bool) -> bool
Checks if the keybinding was pressed by the user.
§Arguments
- ignore_if_any_focused- Determines whether keyboard shortcuts pressed while another widget is currently in focus should be ignored. In most cases, this should be enabled so that no shortcuts are executed if, for example, the search text field is currently in focus. With the selection keybindings, however, it is desired that when they are pressed, the text fields lose focus and the keybinding is executed.
Trait Implementations§
source§impl Clone for KeyBinding
 
impl Clone for KeyBinding
source§fn clone(&self) -> KeyBinding
 
fn clone(&self) -> KeyBinding
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreAuto Trait Implementations§
impl Freeze for KeyBinding
impl RefUnwindSafe for KeyBinding
impl Send for KeyBinding
impl Sync for KeyBinding
impl Unpin for KeyBinding
impl UnwindSafe for KeyBinding
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
source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)