Cancel dragging in Pearl by pressing Escape or Backspace.

This commit is contained in:
Jonas Kölker
2015-09-22 11:41:41 +02:00
committed by Simon Tatham
parent bf8ff09a84
commit ea8da331e3
2 changed files with 9 additions and 3 deletions

View File

@ -2058,6 +2058,11 @@ static char *interpret_move(const game_state *state, game_ui *ui,
} }
} }
if (button == 27 || button == '\b') {
ui->ndragcoords = -1;
return "";
}
if (release) { if (release) {
if (ui->ndragcoords > 0) { if (ui->ndragcoords > 0) {
/* End of a drag: process the cached line data. */ /* End of a drag: process the cached line data. */

View File

@ -2989,9 +2989,10 @@ white clue has to be a corner, but don't yet know which way the corner
turns, you might mark the one way it \e{can't} go with a cross.) turns, you might mark the one way it \e{can't} go with a cross.)
Alternatively, use the cursor keys to move the cursor. Use the Enter Alternatively, use the cursor keys to move the cursor. Use the Enter
key to begin and end keyboard `drag' operations. Use the Space key to key to begin and end keyboard `drag' operations. Use the Space,
cancel the drag. Or, hold Control while dragging with the cursor keys Escape or Backspace keys to cancel the drag. Or, hold Control while
to toggle segments as you move between squares. dragging with the cursor keys to toggle segments as you move between
squares.
Pressing Control-Shift-arrowkey or Shift-arrowkey simulates a left or Pressing Control-Shift-arrowkey or Shift-arrowkey simulates a left or
right click, respectively, on the edge in the direction of the key. right click, respectively, on the edge in the direction of the key.