pub struct DispatchKeyEventCommandBuilder { /* private fields */ }Input only.Implementations§
Source§impl DispatchKeyEventCommandBuilder
impl DispatchKeyEventCommandBuilder
Sourcepub fn type(&mut self, v: DispatchKeyEventCommandType) -> &mut Self
pub fn type(&mut self, v: DispatchKeyEventCommandType) -> &mut Self
Type of the key event.
Sourcepub fn modifiers(&mut self, v: u32) -> &mut Self
pub fn modifiers(&mut self, v: u32) -> &mut Self
Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
Sourcepub fn timestamp(&mut self, v: TimeSinceEpoch) -> &mut Self
pub fn timestamp(&mut self, v: TimeSinceEpoch) -> &mut Self
Time at which the event occurred.
Sourcepub fn text(&mut self, v: String) -> &mut Self
pub fn text(&mut self, v: String) -> &mut Self
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(&mut self, v: String) -> &mut Self
pub fn unmodified_text(&mut self, v: String) -> &mut Self
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(&mut self, v: String) -> &mut Self
pub fn key_identifier(&mut self, v: String) -> &mut Self
Unique key identifier (e.g., ‘U+0041’) (default: “”).
Sourcepub fn code(&mut self, v: String) -> &mut Self
pub fn code(&mut self, v: String) -> &mut Self
Unique DOM defined string value for each physical key (e.g., ‘KeyA’) (default: “”).
Sourcepub fn key(&mut self, v: String) -> &mut Self
pub fn key(&mut self, v: String) -> &mut Self
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(&mut self, v: u32) -> &mut Self
pub fn windows_virtual_key_code(&mut self, v: u32) -> &mut Self
Windows virtual key code (default: 0).
Sourcepub fn native_virtual_key_code(&mut self, v: u32) -> &mut Self
pub fn native_virtual_key_code(&mut self, v: u32) -> &mut Self
Native virtual key code (default: 0).
Sourcepub fn auto_repeat(&mut self, v: bool) -> &mut Self
pub fn auto_repeat(&mut self, v: bool) -> &mut Self
Whether the event was generated from auto repeat (default: false).
Sourcepub fn is_keypad(&mut self, v: bool) -> &mut Self
pub fn is_keypad(&mut self, v: bool) -> &mut Self
Whether the event was generated from the keypad (default: false).
Sourcepub fn is_system_key(&mut self, v: bool) -> &mut Self
pub fn is_system_key(&mut self, v: bool) -> &mut Self
Whether the event was a system key event (default: false).
Sourcepub fn location(&mut self, v: u32) -> &mut Self
pub fn location(&mut self, v: u32) -> &mut Self
Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
Sourcepub fn commands(&mut self, v: Vec<String>) -> &mut Self
Available on crate feature experimental only.
pub fn commands(&mut self, v: Vec<String>) -> &mut Self
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.
pub fn build(&mut self) -> Result<DispatchKeyEventCommand, &'static str>
Trait Implementations§
Source§impl Clone for DispatchKeyEventCommandBuilder
impl Clone for DispatchKeyEventCommandBuilder
Source§fn clone(&self) -> DispatchKeyEventCommandBuilder
fn clone(&self) -> DispatchKeyEventCommandBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more