pub type cef_keyboard_handler_t = _cef_keyboard_handler_t;Expand description
Implement this structure to handle events related to keyboard input. The functions of this structure will be called on the UI thread.
NOTE: This struct is allocated client-side.
Aliased Type§
#[repr(C)]pub struct cef_keyboard_handler_t {
pub base: _cef_base_ref_counted_t,
pub on_pre_key_event: Option<unsafe extern "C" fn(*mut _cef_keyboard_handler_t, *mut _cef_browser_t, *const _cef_key_event_t, *mut _XEvent, *mut i32) -> i32>,
pub on_key_event: Option<unsafe extern "C" fn(*mut _cef_keyboard_handler_t, *mut _cef_browser_t, *const _cef_key_event_t, *mut _XEvent) -> i32>,
}Fields§
§base: _cef_base_ref_counted_tBase structure.
on_pre_key_event: Option<unsafe extern "C" fn(*mut _cef_keyboard_handler_t, *mut _cef_browser_t, *const _cef_key_event_t, *mut _XEvent, *mut i32) -> i32>Called before a keyboard event is sent to the renderer. |event| contains information about the keyboard event. |os_event| is the operating system event message, if any. Return true (1) if the event was handled or false (0) otherwise. If the event will be handled in on_key_event() as a keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false (0).
on_key_event: Option<unsafe extern "C" fn(*mut _cef_keyboard_handler_t, *mut _cef_browser_t, *const _cef_key_event_t, *mut _XEvent) -> i32>Called after the renderer and JavaScript in the page has had a chance to handle the event. |event| contains information about the keyboard event. |os_event| is the operating system event message, if any. Return true (1) if the keyboard event was handled or false (0) otherwise.