mirror of
https://github.com/maaslalani/slides.git
synced 2026-01-10 06:48:01 -05:00
Added Page Up and Page Down navigation (#115)
* Added `Page Up` and `Page Down` navigation
This commit is contained in:
@@ -131,6 +131,7 @@ Go to the next slide with any of the following key sequences:
|
||||
* <kbd>n</kbd>
|
||||
* <kbd>j</kbd>
|
||||
* <kbd>l</kbd>
|
||||
* <kbd>pgdown</kbd>
|
||||
* number + any of the above (go forward n slides)
|
||||
|
||||
Go to the previous slide with any of the following key sequences:
|
||||
@@ -139,6 +140,7 @@ Go to the previous slide with any of the following key sequences:
|
||||
* <kbd>p</kbd>
|
||||
* <kbd>h</kbd>
|
||||
* <kbd>k</kbd>
|
||||
* <kbd>pgup</kbd>
|
||||
* number + any of the above (go back n slides)
|
||||
|
||||
Go to a specific slide with the following key sequence:
|
||||
|
||||
@@ -52,12 +52,12 @@ func Navigate(state State, keyPress string) State {
|
||||
Page: targetSlide,
|
||||
TotalSlides: state.TotalSlides,
|
||||
}
|
||||
case " ", "down", "j", "right", "l", "enter", "n":
|
||||
case " ", "down", "j", "right", "l", "enter", "n", "pgdown":
|
||||
return State{
|
||||
Page: navigateNext(state),
|
||||
TotalSlides: state.TotalSlides,
|
||||
}
|
||||
case "up", "k", "left", "h", "p":
|
||||
case "up", "k", "left", "h", "p", "pgup":
|
||||
return State{
|
||||
Page: navigatePrevious(state),
|
||||
TotalSlides: state.TotalSlides,
|
||||
|
||||
Reference in New Issue
Block a user