shithub: puzzles

Download patch

ref: 5157a18550706de319ddb4d723490f5055531368
parent: 1b3a6bd2044d074c506cbd22327b3314e43d055a
author: Ben Harris <bjh21@bjh21.me.uk>
date: Tue Nov 15 18:33:37 EST 2022

Extra key mappings: '*' to undo and '#' to redo

This is what I keep expecting on my phone.  Implemented in the mid-end
since no backend currently uses those keys.

--- a/midend.c
+++ b/midend.c
@@ -958,7 +958,7 @@
 	    midend_redraw(me);
             *handled = true;
 	    goto done;		       /* never animate */
-	} else if (button == 'u' || button == 'U' ||
+	} else if (button == 'u' || button == 'U' || button == '*' ||
 		   button == '\x1A' || button == '\x1F' ||
                    button == UI_UNDO) {
 	    midend_stop_anim(me);
@@ -967,7 +967,7 @@
 	    if (!midend_undo(me))
 		goto done;
             *handled = true;
-	} else if (button == 'r' || button == 'R' ||
+	} else if (button == 'r' || button == 'R' || button == '#' ||
 		   button == '\x12' || button == '\x19' ||
                    button == UI_REDO) {
 	    midend_stop_anim(me);