void MiniBrowser::handleKeyPressEvent(const XKeyPressedEvent& event) { if (!m_view) return; bool shouldUseUpperCase; KeySym symbol = chooseSymbolForXKeyEvent(event, &shouldUseUpperCase); NavigationCommand command = checkNavigationCommand(symbol, event.state); switch (command) { case BackNavigation: WKPageGoBack(pageRef()); return; case ForwardNavigation: WKPageGoForward(pageRef()); return; case ReloadNavigation: WKPageReload(pageRef()); return; default: NIXKeyEvent nixEvent = convertXKeyEventToNixKeyEvent(event, symbol, shouldUseUpperCase); NIXViewSendKeyEvent(m_view, &nixEvent); } }
void Tab::forward() { if (WKPageCanGoForward(m_page)) WKPageGoForward(m_page); }