[−][src]Enum kas::event::ControlKey
Control / Navigation key (Event::Control
)
These codes are generated from keyboard events when a widget has char or
nav focus. The codes generated differ slightly depending on which focus
dominates; see notes on ControlKey::Return
and ControlKey::Tab
.
In some cases, a widget's response will depend on the state of modifier
keys. This state can be read via the Manager::modifiers
method.
The purpose of this enum (instead of sending the active widget a
VirtualKeyCode
) is consistent behaviour: these "navigation keys" will
always be sent to the widget highlighted for keyboard navigation, if active,
while alpha-numeric keys will always be available for accelerator keys
(when a character input grab is not present). Additionally, this allows
uniform behaviour with regards to num-pad keys.
Variants
Escape key
Each press of this key should somehow relax control. It is expected that
widgets receiving this key repeatedly eventually (soon) have no more
use for this themselves and return it via Response::Unhandled
.
Line break (return / enter key)
Note: this is generated only when a widget has char focus (see
Manager::request_char_focus
), otherwise the Return key is mapped to
Event::Activate
and sent to the widget with nav focus.
(Horizontal) tabulation
Note: this is generated only when a widget has char focus (see
Manager::request_char_focus
), otherwise the Tab key adjusts nav
focus.
Left arrow
Right arrow
Up arrow
Down arrow
Home key
End key
Page up
Page down
"Screenshot" key
Scroll lock key
Pause key
Insert key
Delete forwards
Delete backwards
Clear any selections
Select all contents
Copy to clipboard and clear
Copy to clipboard
Copy from clipboard
Undo the last action
Redo the last undone action
Navigate backwards one page/item
Navigate forwards one page/item
Implementations
impl ControlKey
[src]
pub fn new(vkey: VirtualKeyCode) -> Option<Self>
[src]
Try constructing from a VirtualKeyCode
Trait Implementations
impl Clone for ControlKey
[src]
pub fn clone(&self) -> ControlKey
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ControlKey
[src]
impl Debug for ControlKey
[src]
impl Eq for ControlKey
[src]
impl Hash for ControlKey
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ControlKey> for ControlKey
[src]
pub fn eq(&self, other: &ControlKey) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ControlKey
[src]
impl StructuralPartialEq for ControlKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for ControlKey
impl Send for ControlKey
impl Sync for ControlKey
impl Unpin for ControlKey
impl UnwindSafe for ControlKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,