+2007-06-19 Dave Hyatt <hyatt@apple.com>
+
+ Fix for <rdar://problem/5022197>, backspace and ctrl+left arrow should go back. Shift+backspace
+ and ctrl+right arrow should go forward. Add support for these keybindings to Windows.
+
+ Reviewed by ada
+
+ * WebView.cpp:
+ (WebView::keyDown):
+
2007-06-18 Dave Hyatt <hyatt@apple.com>
Let through more newline+modifier key combos in order to support Alt+Enter and Ctrl+Enter in the
// FIXME: We may need to handle other messages for international text.
// Don't send key events for shift, ctrl, and capslock keys when they're by themselves
- if (virtualKeyCode == VK_SHIFT || virtualKeyCode == VK_CONTROL || virtualKeyCode == VK_CAPITAL) {
+ if (virtualKeyCode == VK_SHIFT || virtualKeyCode == VK_CONTROL || virtualKeyCode == VK_CAPITAL)
return false;
- }
PlatformKeyboardEvent keyEvent(m_viewWindow, virtualKeyCode, keyData, m_currentCharacterCode);
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame->eventHandler()->keyEvent(keyEvent))
return true;
+ // We need to handle back/forward using either Backspace(+Shift) or Ctrl+Left/Right Arrow keys.
+ int windowsKeyCode = keyEvent.WindowsKeyCode();
+ if ((windowsKeyCode == VK_BACK && keyEvent.shiftKey()) || (windowsKeyCode == VK_RIGHT && keyEvent.ctrlKey()))
+ m_page->goForward();
+ else if (windowsKeyCode == VK_BACK || (windowsKeyCode == VK_LEFT && keyEvent.ctrlKey()))
+ m_page->goBack();
+
// Need to scroll the page if the arrow keys, space(shift), pgup/dn, or home/end are hit.
ScrollDirection direction;
ScrollGranularity granularity;
- switch (keyEvent.WindowsKeyCode()) {
+ switch (windowsKeyCode) {
case VK_LEFT:
granularity = ScrollByLine;
direction = ScrollLeft;