pub enum Key {
Show 44 variants
ArrowUp,
ArrowDown,
ArrowLeft,
ArrowRight,
Home,
End,
PageUp,
PageDown,
Enter,
Tab,
Space,
Backspace,
Delete,
Insert,
Escape,
Shift,
Control,
Alt,
Super,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
CapsLock,
NumLock,
ScrollLock,
PrintScreen,
Pause,
ContextMenu,
Copy,
Cut,
Paste,
Undo,
Redo,
Char(char),
Named(String),
}Expand description
A keyboard key.
Common keys have dedicated variants for compile-time safety and
IDE autocomplete. Rare keys (media, TV remote, IME) use the
Named fallback with the iced/winit PascalCase
name string.
Variants§
ArrowUp
Arrow Up.
ArrowDown
Arrow Down.
ArrowLeft
Arrow Left.
ArrowRight
Arrow Right.
Home
Home.
End
End.
PageUp
Page Up.
PageDown
Page Down.
Enter
Enter.
Tab
Tab.
Space
Space.
Backspace
Backspace.
Delete
Delete.
Insert
Insert.
Escape
Escape.
Shift
Shift.
Control
Control.
Alt
Alt.
Super
Super.
F1
F1.
F2
F2.
F3
F3.
F4
F4.
F5
F5.
F6
F6.
F7
F7.
F8
F8.
F9
F9.
F10
F10.
F11
F11.
F12
F12.
CapsLock
Caps Lock.
NumLock
Num Lock.
ScrollLock
Scroll Lock.
PrintScreen
Print Screen.
Pause
Pause.
ContextMenu
Context Menu.
Copy
Copy.
Cut
Cut.
Paste
Paste.
Undo
Undo.
Redo
Redo.
Char(char)
Char.
Named(String)
A named key not covered by the common variants above.
Uses the iced/winit PascalCase name (e.g. “MediaPlay”, “BrowserBack”, “LaunchMail”). Forward-compatible: new iced key names work without updating this enum.
Implementations§
Trait Implementations§
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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