pub struct DispatchKeyEventCommand { /* private fields */ }Input only.Expand description
Dispatches a key event to the page.
Implementations§
Source§impl DispatchKeyEventCommand
impl DispatchKeyEventCommand
pub fn builder() -> DispatchKeyEventCommandBuilder
Sourcepub fn type(&self) -> &DispatchKeyEventCommandType
pub fn type(&self) -> &DispatchKeyEventCommandType
Type of the key event.
Sourcepub fn modifiers(&self) -> Option<&u32>
pub fn modifiers(&self) -> Option<&u32>
Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
Sourcepub fn timestamp(&self) -> Option<&TimeSinceEpoch>
pub fn timestamp(&self) -> Option<&TimeSinceEpoch>
Time at which the event occurred.
Sourcepub fn text(&self) -> Option<&String>
pub fn text(&self) -> Option<&String>
Text as generated by processing a virtual key code with a keyboard layout. Not needed for
for keyUp and rawKeyDown events (default: “”)
Sourcepub fn unmodified_text(&self) -> Option<&String>
pub fn unmodified_text(&self) -> Option<&String>
Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: “”).
Sourcepub fn key_identifier(&self) -> Option<&String>
pub fn key_identifier(&self) -> Option<&String>
Unique key identifier (e.g., ‘U+0041’) (default: “”).
Sourcepub fn code(&self) -> Option<&String>
pub fn code(&self) -> Option<&String>
Unique DOM defined string value for each physical key (e.g., ‘KeyA’) (default: “”).
Sourcepub fn key(&self) -> Option<&String>
pub fn key(&self) -> Option<&String>
Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., ‘AltGr’) (default: “”).
Sourcepub fn windows_virtual_key_code(&self) -> Option<&u32>
pub fn windows_virtual_key_code(&self) -> Option<&u32>
Windows virtual key code (default: 0).
Sourcepub fn native_virtual_key_code(&self) -> Option<&u32>
pub fn native_virtual_key_code(&self) -> Option<&u32>
Native virtual key code (default: 0).
Sourcepub fn auto_repeat(&self) -> Option<&bool>
pub fn auto_repeat(&self) -> Option<&bool>
Whether the event was generated from auto repeat (default: false).
Sourcepub fn is_keypad(&self) -> Option<&bool>
pub fn is_keypad(&self) -> Option<&bool>
Whether the event was generated from the keypad (default: false).
Sourcepub fn is_system_key(&self) -> Option<&bool>
pub fn is_system_key(&self) -> Option<&bool>
Whether the event was a system key event (default: false).
Sourcepub fn location(&self) -> Option<&u32>
pub fn location(&self) -> Option<&u32>
Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
Sourcepub fn commands(&self) -> Option<&Vec<String>>
Available on crate feature experimental only.
pub fn commands(&self) -> Option<&Vec<String>>
experimental only.Editing commands to send with the key event (e.g., ‘selectAll’) (default: []).
These are related to but not equal the command names used in document.execCommand and NSStandardKeyBindingResponding.
See https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
Trait Implementations§
Source§impl Clone for DispatchKeyEventCommand
impl Clone for DispatchKeyEventCommand
Source§fn clone(&self) -> DispatchKeyEventCommand
fn clone(&self) -> DispatchKeyEventCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more