+ * Called from front end when a keypress occurs, to trigger
+ * anything magical that needs to happen in that situation.
+ */
+void term_seen_key_event(void)
+{
+ /*
+ * On any keypress, clear the bell overload mechanism
+ * completely, on the grounds that large numbers of
+ * beeps coming from deliberate key action are likely
+ * to be intended (e.g. beeps from filename completion
+ * blocking repeatedly).
+ */
+ beep_overloaded = FALSE;
+ while (beephead) {
+ struct beeptime *tmp = beephead;
+ beephead = tmp->next;
+ sfree(tmp);
+ }
+ beeptail = NULL;
+ nbeeps = 0;
+
+ /*
+ * Reset the scrollback on keypress, if we're doing that.
+ */
+ if (cfg.scroll_on_key) {
+ disptop = 0; /* return to main screen */
+ seen_disp_event = 1;
+ }
+}
+
+/*