aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2005-06-28 18:10:20 +0000
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2005-06-28 18:10:20 +0000
commit1c896ef18bef2114dfd5874b2af56c011f7729b1 (patch)
treea91dafc2c65989a82ca9624536f26fe29585da7b
parentea172a046012b550d5d395b511b9d08aeb6ea66d (diff)
downloadpuzzles-1c896ef18bef2114dfd5874b2af56c011f7729b1.zip
puzzles-1c896ef18bef2114dfd5874b2af56c011f7729b1.tar.gz
puzzles-1c896ef18bef2114dfd5874b2af56c011f7729b1.tar.bz2
puzzles-1c896ef18bef2114dfd5874b2af56c011f7729b1.tar.xz
Make peg removal accessible from the keyboard.
[originally from svn r6032]
-rw-r--r--guess.c4
-rw-r--r--puzzles.but3
2 files changed, 6 insertions, 1 deletions
diff --git a/guess.c b/guess.c
index 7e51642..a871e72 100644
--- a/guess.c
+++ b/guess.c
@@ -714,6 +714,10 @@ static char *interpret_move(game_state *from, game_ui *ui, game_drawstate *ds,
set_peg(&from->params, ui, ui->peg_cur, ui->colour_cur+1);
ret = "";
}
+ } else if (button == 'D' || button == 'd' || button == '\b') {
+ ui->display_cur = 1;
+ set_peg(&from->params, ui, ui->peg_cur, 0);
+ ret = "";
} else if (button == 'H' || button == 'h') {
ui->display_cur = 1;
ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur];
diff --git a/puzzles.but b/puzzles.but
index 9d67361..71ff48f 100644
--- a/puzzles.but
+++ b/puzzles.but
@@ -1077,7 +1077,8 @@ after marking.
Alternatively, with the keyboard, the up and down cursor keys can be
used to select a peg colour, the left and right keys to select a
peg position, and the space bar or Enter key to place a peg of the
-selected colour in the chosen position. \q{H} adds a hold marker.
+selected colour in the chosen position. \q{D} or Backspace removes a
+peg, and \q{H} adds a hold marker.
When the guess is complete, the smaller feedback pegs will be highlighted;
clicking on these (or moving the peg cursor to them with the arrow keys