+ * Translate keyboard presses to cursor selection.
+ */
+ if (button == '\n' || button == '\r')
+ button = CURSOR_SELECT;
+ if (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';
+
+ /*