Hmm... now that I think about it, I wonder if we need to make changes
in
`read_key_sequence` at all, because we can instead arrange for all keys
to be bound:
diff --git a/lisp/subr.el b/lisp/subr.el
index 725722cbee..1ca1d51d44 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2453,10 +2453,11 @@ memory-limit
;;;; Input and display facilities.
(defconst read-key-empty-map (make-sparse-keymap))
-
+(defconst read-key-full-map
+ (let ((map (make-sparse-keymap))) (define-key map [t] 'dummy)
map))
(defvar read-key-delay 0.01) ;Fast enough for 100Hz repeat rate,
hopefully.
-(defun read-key (&optional prompt)
+(defun read-key (&optional prompt dont-fallback)
"Read a key from the keyboard.
Contrary to `read-event' this will not return a raw event but
instead will
obey the input decoding and translations usually done by
`read-key-sequence'.
@@ -2468,7 +2469,8 @@ read-key
;; always inherits the input method, in practice read-key does
not
;; inherit the input method (at least not if it's based on
quail).
(let ((overriding-terminal-local-map nil)
- (overriding-local-map read-key-empty-map)
+ (overriding-local-map
+ (if dont-fallback read-key-full-map read-key-empty-map))
(echo-keystrokes 0)
(old-global-map (current-global-map))
(timer (run-with-idle-timer
WDYT?