mirror of
https://github.com/makeworld-the-better-one/amfora.git
synced 2024-09-11 14:55:51 +03:00
✨ F1 & F2 keys for tab nav. - #64
This commit is contained in:
parent
70438cfdb5
commit
5cb629f4c3
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Added
|
||||
- Emoji favicons can now be seen if `emoji_favicons` is enabled in the config (#62)
|
||||
- The `shift_numbers` key in the config was added, so that non US keyboard users can navigate tabs (#64)
|
||||
- <kbd>F1</kbd> and <kbd>F2</kbd> keys for navigating to the previous and next tabs (#64)
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -352,6 +352,14 @@ func Init() {
|
||||
case tcell.KeyCtrlC:
|
||||
Stop()
|
||||
return nil
|
||||
case tcell.KeyF1:
|
||||
// Wrap around, allow for modulo with negative numbers
|
||||
n := NumTabs()
|
||||
SwitchTab((((curTab - 1) % n) + n) % n)
|
||||
return nil
|
||||
case tcell.KeyF2:
|
||||
SwitchTab((curTab + 1) % NumTabs())
|
||||
return nil
|
||||
case tcell.KeyRune:
|
||||
// Regular key was sent
|
||||
|
||||
|
@ -28,6 +28,8 @@ Enter, Tab|On a page this will start link highlighting.
|
||||
|Press Enter again to go to one, or Esc to stop.
|
||||
Shift-NUMBER|Go to a specific tab.
|
||||
Shift-0, )|Go to the last tab.
|
||||
F1|Previous tab
|
||||
F2|Next tab
|
||||
Ctrl-H|Go home
|
||||
Ctrl-T|New tab, or if a link is selected,
|
||||
|this will open the link in a new tab.
|
||||
|
Loading…
Reference in New Issue
Block a user