Struct web_sys::KeyboardEvent
source · #[repr(transparent)]pub struct KeyboardEvent { /* private fields */ }
Expand description
The KeyboardEvent
object
This API requires the following crate features to be activated: KeyboardEvent
Implementations§
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn new_with_keyboard_event_init_dict(
type_arg: &str,
keyboard_event_init_dict: &KeyboardEventInit
) -> Result<KeyboardEvent, JsValue>
pub fn new_with_keyboard_event_init_dict(
type_arg: &str,
keyboard_event_init_dict: &KeyboardEventInit
) -> Result<KeyboardEvent, JsValue>
The new KeyboardEvent(..)
constructor, creating a new instance of KeyboardEvent
This API requires the following crate features to be activated: KeyboardEvent
, KeyboardEventInit
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn get_modifier_state(&self, key: &str) -> bool
pub fn get_modifier_state(&self, key: &str) -> bool
The getModifierState()
method
This API requires the following crate features to be activated: KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool,
alt_key: bool
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool,
alt_key: bool
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key_and_shift_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool,
alt_key: bool,
shift_key: bool
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key_and_shift_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool,
alt_key: bool,
shift_key: bool
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool
) -> Result<(), JsValue>
pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key(
&self,
type_arg: &str,
bubbles_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
key_arg: &str,
location_arg: u32,
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool
) -> Result<(), JsValue>
The initKeyboardEvent()
method
This API requires the following crate features to be activated: KeyboardEvent
, Window
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
sourcepub fn is_composing(&self) -> bool
pub fn is_composing(&self) -> bool
The isComposing
getter
This API requires the following crate features to be activated: KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
source§impl KeyboardEvent
impl KeyboardEvent
pub const DOM_KEY_LOCATION_STANDARD: u32 = 0u32
source§impl KeyboardEvent
impl KeyboardEvent
pub const DOM_KEY_LOCATION_LEFT: u32 = 1u32
source§impl KeyboardEvent
impl KeyboardEvent
pub const DOM_KEY_LOCATION_RIGHT: u32 = 2u32
source§impl KeyboardEvent
impl KeyboardEvent
pub const DOM_KEY_LOCATION_NUMPAD: u32 = 3u32
Trait Implementations§
source§impl AsRef<Event> for KeyboardEvent
impl AsRef<Event> for KeyboardEvent
source§impl AsRef<JsValue> for KeyboardEvent
impl AsRef<JsValue> for KeyboardEvent
source§impl AsRef<Object> for KeyboardEvent
impl AsRef<Object> for KeyboardEvent
source§impl AsRef<UiEvent> for KeyboardEvent
impl AsRef<UiEvent> for KeyboardEvent
source§impl Clone for KeyboardEvent
impl Clone for KeyboardEvent
source§fn clone(&self) -> KeyboardEvent
fn clone(&self) -> KeyboardEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyboardEvent
impl Debug for KeyboardEvent
source§impl From<JsValue> for KeyboardEvent
impl From<JsValue> for KeyboardEvent
source§fn from(obj: JsValue) -> KeyboardEvent
fn from(obj: JsValue) -> KeyboardEvent
source§impl From<KeyboardEvent> for Event
impl From<KeyboardEvent> for Event
source§fn from(obj: KeyboardEvent) -> Event
fn from(obj: KeyboardEvent) -> Event
source§impl From<KeyboardEvent> for JsValue
impl From<KeyboardEvent> for JsValue
source§fn from(obj: KeyboardEvent) -> JsValue
fn from(obj: KeyboardEvent) -> JsValue
source§impl From<KeyboardEvent> for Object
impl From<KeyboardEvent> for Object
source§fn from(obj: KeyboardEvent) -> Object
fn from(obj: KeyboardEvent) -> Object
source§impl From<KeyboardEvent> for UiEvent
impl From<KeyboardEvent> for UiEvent
source§fn from(obj: KeyboardEvent) -> UiEvent
fn from(obj: KeyboardEvent) -> UiEvent
source§impl FromWasmAbi for KeyboardEvent
impl FromWasmAbi for KeyboardEvent
source§impl<'a> IntoWasmAbi for &'a KeyboardEvent
impl<'a> IntoWasmAbi for &'a KeyboardEvent
source§impl IntoWasmAbi for KeyboardEvent
impl IntoWasmAbi for KeyboardEvent
source§impl JsCast for KeyboardEvent
impl JsCast for KeyboardEvent
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for KeyboardEvent
impl OptionFromWasmAbi for KeyboardEvent
source§impl<'a> OptionIntoWasmAbi for &'a KeyboardEvent
impl<'a> OptionIntoWasmAbi for &'a KeyboardEvent
source§impl OptionIntoWasmAbi for KeyboardEvent
impl OptionIntoWasmAbi for KeyboardEvent
source§impl RefFromWasmAbi for KeyboardEvent
impl RefFromWasmAbi for KeyboardEvent
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<KeyboardEvent>
type Anchor = ManuallyDrop<KeyboardEvent>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for KeyboardEvent
impl Send for KeyboardEvent
impl Sync for KeyboardEvent
impl Unpin for KeyboardEvent
impl UnwindSafe for KeyboardEvent
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more