Interface CefKeyboardHandler

  • All Known Implementing Classes:
    CefClient, CefKeyboardHandlerAdapter

    public interface CefKeyboardHandler
    Implement this interface to handle events related to keyboard input. The methods of this class will be called on the UI thread.
    • Method Detail

      • onPreKeyEvent

        boolean onPreKeyEvent​(CefBrowser browser,
                              CefKeyboardHandler.CefKeyEvent event,
                              BoolRef is_keyboard_shortcut)
        Called before a keyboard event is sent to the renderer.
        Parameters:
        browser - the corresponding browser.
        event - contains information about the keyboard event.
        is_keyboard_shortcut - set to true and return false, if the event will be handled in OnKeyEvent() as a keyboard shortcut.
        Returns:
        true if the event was handled or false otherwise.
      • onKeyEvent

        boolean onKeyEvent​(CefBrowser browser,
                           CefKeyboardHandler.CefKeyEvent event)
        Called after the renderer and JavaScript in the page has had a chance to handle the event.
        Parameters:
        browser - the corresponding browser.
        event - contains information about the keyboard event.
        Returns:
        true if the keyboard event was handled or false otherwise.