pub struct AcceleratorKeyPressedArgs(/* private fields */);Expand description
A browser-level key press delivered before the page sees it.
Implementations§
Source§impl AcceleratorKeyPressedArgs
impl AcceleratorKeyPressedArgs
Sourcepub fn key_event_kind(&self) -> KeyEventKind
pub fn key_event_kind(&self) -> KeyEventKind
Returns whether the key was pressed or released, and whether it is a system key.
Sourcepub fn virtual_key(&self) -> u32
pub fn virtual_key(&self) -> u32
Returns the Win32 virtual-key code of the key.
Sourcepub fn is_handled(&self) -> bool
pub fn is_handled(&self) -> bool
Returns true if the key has been marked as handled.
Sourcepub fn set_handled(&self, handled: bool) -> Result<()>
pub fn set_handled(&self, handled: bool) -> Result<()>
Marks the key as handled, preventing WebView2’s default processing so the host can act on the shortcut itself.
Auto Trait Implementations§
impl !Send for AcceleratorKeyPressedArgs
impl !Sync for AcceleratorKeyPressedArgs
impl Freeze for AcceleratorKeyPressedArgs
impl RefUnwindSafe for AcceleratorKeyPressedArgs
impl Unpin for AcceleratorKeyPressedArgs
impl UnsafeUnpin for AcceleratorKeyPressedArgs
impl UnwindSafe for AcceleratorKeyPressedArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more