shithub: spit

Download patch

ref: 528b6d8c25839665550a500e53c4cd9329de3927
parent: 0216663a6e9d723eadc6692c656dd98b2964493b
author: phil9 <telephil9@gmail.com>
date: Sun Feb 4 08:38:59 EST 2024

allow slide navigation using backspace and space (thanks qwx)

	add backspace and space to navigate to previous and next slide respectively.

--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 ![screenshot](screenshot1.png)  
 ![screenshot](screenshot2.png)  
 
-To toggle fullscreen mode press `f`. Navigate between slides using left/right arrow or home/end. Press `q` or `del` to quit spit. 
+To toggle fullscreen mode press `f`. Navigate between slides using left/right arrow (or backspace/space) or home/end. Press `q` or `del` to quit spit. 
 
 Installation:
 -------------
--- a/spit.c
+++ b/spit.c
@@ -427,6 +427,7 @@
 			case 'f':
 				togglefullscreen();
 				break;
+			case Kbs:
 			case Kleft:
 				if(curslide > 0){
 					curslide--;
@@ -433,6 +434,7 @@
 					redraw();
 				}
 				break;
+			case ' ':
 			case Kright:
 				if(curslide < nslides){
 					curslide++;