Struct cdp::input::DispatchKeyEventCommand
[−]
[src]
pub struct DispatchKeyEventCommand<'a> { pub ty: DispatchKeyEventCommandType, pub modifiers: Option<i32>, pub timestamp: Option<TimeSinceEpoch>, pub text: Option<Cow<'a, str>>, pub unmodified_text: Option<Cow<'a, str>>, pub key_identifier: Option<Cow<'a, str>>, pub code: Option<Cow<'a, str>>, pub key: Option<Cow<'a, str>>, pub windows_virtual_key_code: Option<i32>, pub native_virtual_key_code: Option<i32>, pub auto_repeat: Option<bool>, pub is_keypad: Option<bool>, pub is_system_key: Option<bool>, }
Dispatches a key event to the page.
Command Input.dispatchKeyEvent
Domain Module: cdp::input
Command Struct: cdp::input::DispatchKeyEventCommand
Response Struct: cdp::input::DispatchKeyEventResponse
Fields
ty: DispatchKeyEventCommandType
Type of the key event.
modifiers: Option<i32>
Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
timestamp: Option<TimeSinceEpoch>
Time at which the event occurred.
text: Option<Cow<'a, str>>
Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp
and rawKeyDown
events (default: "")
unmodified_text: Option<Cow<'a, str>>
Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
key_identifier: Option<Cow<'a, str>>
Unique key identifier (e.g., 'U+0041') (default: "").
code: Option<Cow<'a, str>>
Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
key: Option<Cow<'a, str>>
Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
windows_virtual_key_code: Option<i32>
Windows virtual key code (default: 0).
native_virtual_key_code: Option<i32>
Native virtual key code (default: 0).
auto_repeat: Option<bool>
Whether the event was generated from auto repeat (default: false).
is_keypad: Option<bool>
Whether the event was generated from the keypad (default: false).
is_system_key: Option<bool>
Whether the event was a system key event (default: false).
Trait Implementations
impl<'a> Clone for DispatchKeyEventCommand<'a>
[src]
fn clone(&self) -> DispatchKeyEventCommand<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for DispatchKeyEventCommand<'a>
[src]
impl<'a> PartialEq for DispatchKeyEventCommand<'a>
[src]
fn eq(&self, __arg_0: &DispatchKeyEventCommand<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DispatchKeyEventCommand<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> CdpCommand for DispatchKeyEventCommand<'a>
[src]
const COMMAND_NAME: &'static str
COMMAND_NAME: &'static str = "Input.dispatchKeyEvent"
impl<'a> SerializeCdpCommand for DispatchKeyEventCommand<'a>
[src]
fn command_name(&self) -> &str
[src]
fn serialize_command_params<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
impl<'de, 'a> DeserializeCdpCommand<'de> for DispatchKeyEventCommand<'a>
[src]
fn deserialize_command<D>(
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,
[src]
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,