Struct stdweb::web::event::KeyDownEvent [−][src]
pub struct KeyDownEvent(_);
The KeyDownEvent
is fired when a key is pressed down.
Unlike the KeyPressEvent
event it's also fired for keys which
do not produce a character value.
Trait Implementations
impl Clone for KeyDownEvent
[src]
impl Clone for KeyDownEvent
fn clone(&self) -> KeyDownEvent
[src]
fn clone(&self) -> KeyDownEvent
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for KeyDownEvent
[src]
impl Debug for KeyDownEvent
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for KeyDownEvent
[src]
impl PartialEq for KeyDownEvent
fn eq(&self, other: &KeyDownEvent) -> bool
[src]
fn eq(&self, other: &KeyDownEvent) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &KeyDownEvent) -> bool
[src]
fn ne(&self, other: &KeyDownEvent) -> bool
This method tests for !=
.
impl Eq for KeyDownEvent
[src]
impl Eq for KeyDownEvent
impl InstanceOf for KeyDownEvent
[src]
impl InstanceOf for KeyDownEvent
fn instance_of(reference: &Reference) -> bool
[src]
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type Self
.
impl AsRef<Reference> for KeyDownEvent
[src]
impl AsRef<Reference> for KeyDownEvent
impl ReferenceType for KeyDownEvent
[src]
impl ReferenceType for KeyDownEvent
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more
impl From<KeyDownEvent> for Reference
[src]
impl From<KeyDownEvent> for Reference
fn from(value: KeyDownEvent) -> Self
[src]
fn from(value: KeyDownEvent) -> Self
Performs the conversion.
impl TryFrom<KeyDownEvent> for Reference
[src]
impl TryFrom<KeyDownEvent> for Reference
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: KeyDownEvent) -> Result<Self, Self::Error>
[src]
fn try_from(value: KeyDownEvent) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Reference> for KeyDownEvent
[src]
impl TryFrom<Reference> for KeyDownEvent
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
fn try_from(reference: Reference) -> Result<Self, Self::Error>
Performs the conversion.
impl<'_r> TryFrom<&'_r Reference> for KeyDownEvent
[src]
impl<'_r> TryFrom<&'_r Reference> for KeyDownEvent
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Value> for KeyDownEvent
[src]
impl TryFrom<Value> for KeyDownEvent
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
fn try_from(value: Value) -> Result<Self, Self::Error>
Performs the conversion.
impl<'_r> TryFrom<&'_r Value> for KeyDownEvent
[src]
impl<'_r> TryFrom<&'_r Value> for KeyDownEvent
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
fn try_from(value: &Value) -> Result<Self, Self::Error>
Performs the conversion.
impl JsSerialize for KeyDownEvent
[src]
impl JsSerialize for KeyDownEvent
impl IEvent for KeyDownEvent
[src]
impl IEvent for KeyDownEvent
fn bubbles(&self) -> bool
[src]
fn bubbles(&self) -> bool
Indicates whether this event bubbles upward through the DOM. Read more
fn cancel_bubble(&self) -> bool
[src]
fn cancel_bubble(&self) -> bool
A historical alias to Event.stopPropagation()
. Read more
fn set_cancel_bubble(&self, value: bool)
[src]
fn set_cancel_bubble(&self, value: bool)
A historical alias to Event.stopPropagation()
. Setting this to true
before returning from an event handler will stop propagation of the event. Read more
fn cancelable(&self) -> bool
[src]
fn cancelable(&self) -> bool
Indicates whether the event is cancelable. Read more
fn current_target(&self) -> Option<EventTarget>
[src]
fn current_target(&self) -> Option<EventTarget>
A reference to the currently registered target of this event. Read more
fn default_prevented(&self) -> bool
[src]
fn default_prevented(&self) -> bool
Indicates whether preventDefault
has been called on this event. Read more
fn event_phase(&self) -> EventPhase
[src]
fn event_phase(&self) -> EventPhase
Indicates which phase of event flow is currently being evaluated. Read more
fn stop_immediate_propagation(&self)
[src]
fn stop_immediate_propagation(&self)
Prevents any further listeners from being called for this event. Read more
fn stop_propagation(&self)
[src]
fn stop_propagation(&self)
Stops the propagation of this event to descendants in the DOM. Read more
fn target(&self) -> Option<EventTarget>
[src]
fn target(&self) -> Option<EventTarget>
Returns a reference to the target to which this event was originally registered. Read more
fn time_stamp(&self) -> Option<f64>
[src]
fn time_stamp(&self) -> Option<f64>
Returns the time in milliseconds at which this event was created. Read more
fn is_trusted(&self) -> bool
[src]
fn is_trusted(&self) -> bool
Indicates whether the event was generated by a user action.
fn event_type(&self) -> String
[src]
fn event_type(&self) -> String
Returns a string containing the type of event. It is set when the event is constructed and is the name commonly used to refer to the specific event. Read more
fn prevent_default(&self)
[src]
fn prevent_default(&self)
Cancels the event if it is cancelable, without stopping further propagation of the event. Read more
impl IKeyboardEvent for KeyDownEvent
[src]
impl IKeyboardEvent for KeyDownEvent
fn alt_key(&self) -> bool
[src]
fn alt_key(&self) -> bool
Indicates whether the Alt key was down when this event was fired. Read more
fn code(&self) -> String
[src]
fn code(&self) -> String
Returns a code value that indicates the physical key pressed on the keyboard. Read more
fn ctrl_key(&self) -> bool
[src]
fn ctrl_key(&self) -> bool
Returns whether the Ctrl key was down when this event was fired. Read more
fn get_modifier_state(&self, key: ModifierKey) -> bool
[src]
fn get_modifier_state(&self, key: ModifierKey) -> bool
Returns whether a modifier key was down when this event was fired. Read more
fn is_composing(&self) -> bool
[src]
fn is_composing(&self) -> bool
Returns whether this event was fired during composition. Read more
fn location(&self) -> KeyboardLocation
[src]
fn location(&self) -> KeyboardLocation
Returns the location of the key on the keyboard. Read more
fn key(&self) -> String
[src]
fn key(&self) -> String
Returns the value of a key or keys pressed by the user. Read more
fn meta_key(&self) -> bool
[src]
fn meta_key(&self) -> bool
Indicates whether the Meta key was down when this event was fired. Read more
fn repeat(&self) -> bool
[src]
fn repeat(&self) -> bool
Indicates whether the key is held down such that it is repeating. Read more
fn shift_key(&self) -> bool
[src]
fn shift_key(&self) -> bool
Indicates whether the Shift key was down when this event was fired. Read more
impl ConcreteEvent for KeyDownEvent
[src]
impl ConcreteEvent for KeyDownEvent
const EVENT_TYPE: &'static str
EVENT_TYPE: &'static str = "keydown"
A string representing the event type. Read more
Auto Trait Implementations
impl Send for KeyDownEvent
impl Send for KeyDownEvent
impl Sync for KeyDownEvent
impl Sync for KeyDownEvent