diff --git a/CHANGELOG.md b/CHANGELOG.md index 03724fd..99284c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Alt-Left and Alt-Right for history navigation (#23) + ### Fixed - Actual unicode bullet symbol is used for lists: U+2022 - Performance when loading very long cached pages improved (#26) diff --git a/display/display.go b/display/display.go index b8b5a13..0b2eaca 100644 --- a/display/display.go +++ b/display/display.go @@ -190,6 +190,18 @@ func Init() { return event } + // History arrow keys + if event.Modifiers() == tcell.ModAlt { + if event.Key() == tcell.KeyLeft { + histBack() + return nil + } + if event.Key() == tcell.KeyRight { + histForward() + return nil + } + } + switch event.Key() { case tcell.KeyCtrlT: NewTab() diff --git a/display/help.go b/display/help.go index fe17fce..9a69ee8 100644 --- a/display/help.go +++ b/display/help.go @@ -13,8 +13,8 @@ Esc|Leave the help Arrow keys, h/j/k/l|Scroll and move a page. Tab|Navigate to the next item in a popup. Shift-Tab|Navigate to the previous item in a popup. -b|Go back a page -f|Go forward a page +b, Alt-Left|Go back a page +f, Alt-Right|Go forward a page g|Go to top of document G|Go to bottom of document spacebar|Open bar at the bottom - type a URL or link number