diff options
| author | Simon Tatham <anakin@pobox.com> | 2009-12-20 10:01:57 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2009-12-20 10:01:57 +0000 |
| commit | 2bdabe31cf42b34f8d7bb6015c383482cfb5d068 (patch) | |
| tree | 3ad1cc865a62b3700838a27077b862f262138d16 /midend.c | |
| parent | 8628a0630c16bc01c1370a6cb15412dd27c33332 (diff) | |
| download | puzzles-2bdabe31cf42b34f8d7bb6015c383482cfb5d068.zip puzzles-2bdabe31cf42b34f8d7bb6015c383482cfb5d068.tar.gz puzzles-2bdabe31cf42b34f8d7bb6015c383482cfb5d068.tar.bz2 puzzles-2bdabe31cf42b34f8d7bb6015c383482cfb5d068.tar.xz | |
Jonas Koelker points out that the backspace key didn't work in GTK
Guess, because Guess expected ^H whereas GTK generated ^?. Other
puzzles that use Backspace do it by being prepared to see either,
which seems wasteful. Now the midend normalises both into ^H, so
front ends can generate whichever they like while puzzles can
safely just look for ^H.
[originally from svn r8786]
Diffstat (limited to 'midend.c')
| -rw-r--r-- | midend.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -753,6 +753,15 @@ int midend_process_key(midend *me, int x, int y, int button) button = CURSOR_SELECT2; /* + * Normalise both backspace characters (8 and 127) to \b. Easier + * to do this once, here, than to require all front ends to + * carefully generate the same one - now each front end can + * generate whichever is easiest. + */ + if (button == '\177') + button = '\b'; + + /* * Now send on the event we originally received. */ ret = ret && midend_really_process_key(me, x, y, button); |