pub trait ObsContextHotkeyExt {
// Required methods
fn register_frontend_hotkey(
&self,
name: &str,
description: &str,
) -> Result<ObsHotkeyRegistration, ObsError>;
fn inject_hotkey_event(
&self,
key_name: &str,
modifiers: HotkeyModifiers,
pressed: bool,
) -> Result<(), ObsError>;
}Required Methods§
fn register_frontend_hotkey( &self, name: &str, description: &str, ) -> Result<ObsHotkeyRegistration, ObsError>
Sourcefn inject_hotkey_event(
&self,
key_name: &str,
modifiers: HotkeyModifiers,
pressed: bool,
) -> Result<(), ObsError>
fn inject_hotkey_event( &self, key_name: &str, modifiers: HotkeyModifiers, pressed: bool, ) -> Result<(), ObsError>
Injects one libobs hotkey press/release event by OBS key name (for example
"OBS_KEY_F9"). This is useful for application-level testing and virtual input; it does
not synthesize an OS keyboard event.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".