diff --git a/KEYBOARD.md b/KEYBOARD.md index 79ae037..13c247d 100644 --- a/KEYBOARD.md +++ b/KEYBOARD.md @@ -7,6 +7,7 @@ |-----|--------| | `o` | Open address bar (type URL and press Enter) | | `Backspace` | Go back | +| `f` | Go forward | | `r` or `F5` | Refresh current page | | `q` or `Esc` or `F10` | Quit browser | @@ -95,7 +96,6 @@ ## 🐛 Known Limitations - Ctrl+L not yet working for address bar (use 'o' instead) -- Forward navigation not yet implemented - No search functionality yet (/ key) - No bookmarks yet (Ctrl+D) - No history panel yet (F3) diff --git a/README.md b/README.md index 6af9ab7..6cdb3cd 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ cmake --build build -j$(nproc) | `g` | Go to top | | `G` | Go to bottom | | `Backspace` | Go back | +| `f` | Go forward | ### Links | Key | Action | diff --git a/STATUS.md b/STATUS.md index aa5cf95..00a9c31 100644 --- a/STATUS.md +++ b/STATUS.md @@ -34,7 +34,7 @@ - **Content Scrolling** - j/k, g/G, Space/b for navigation - **Link Navigation** - Tab, number keys (1-9), Enter to follow - **Address Bar** - 'o' to open, type URL, Enter to navigate - - **Browser Controls** - Backspace to go back, r/F5 to refresh + - **Browser Controls** - Backspace to go back, 'f' to go forward, r/F5 to refresh - **Real-time Status** - Load stats, scroll position, selected link - **Visual Feedback** - Navigation button states, link highlighting @@ -63,10 +63,6 @@ - n/N navigation not working - No highlight of matches -- ⚠️ **Forward Navigation** - Not yet wired up - - Forward button shows but doesn't work - - Engine supports it, just needs UI connection - ### Feature Gaps - ⚠️ No form support (input fields, buttons, etc.) - ⚠️ No image rendering (even ASCII art) @@ -75,13 +71,7 @@ ## 🎯 Next Steps Priority -### Phase 1: Polish Interactive Features (High Priority) - -1. **Wire Up Forward Navigation** (src/main.cpp) - - Connect forward button click to engine.goForward() - - Add keyboard shortcut (maybe Shift+Backspace or Alt+→) - -### Phase 2: Enhanced UX (Medium Priority) +### Phase 1: Enhanced UX (High Priority) 4. **Implement Search** (src/ui/content_view.cpp) - Add / to start search - Highlight matches @@ -131,6 +121,7 @@ Interactive test: ✅ Press '1' to jump to link 1 - WORKS ✅ Enter to follow link - WORKS ✅ Backspace to go back - WORKS +✅ 'f' to go forward - WORKS ✅ 'r' to refresh - WORKS ✅ 'o' to open address bar - WORKS ``` diff --git a/src/main.cpp b/src/main.cpp index 044fec0..a409e38 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,6 +49,7 @@ void printHelp(const char* prog_name) { << " Shift+Tab Previous link\n" << " Enter Follow link\n" << " Backspace Go back\n" + << " f Go forward\n" << " / Search in page\n" << " n/N Next/previous search result\n" << " Ctrl+L Focus address bar\n" diff --git a/src/ui/main_window.cpp b/src/ui/main_window.cpp index 2d9e9df..94ca3db 100644 --- a/src/ui/main_window.cpp +++ b/src/ui/main_window.cpp @@ -309,6 +309,12 @@ int MainWindow::run() { } return true; } + if (event == Event::Character('f') && impl_->can_go_forward_) { + if (impl_->on_event_) { + impl_->on_event_(WindowEvent::Forward); + } + return true; + } // Refresh if (event == Event::Character('r') || event == Event::F5) {