How can I read a single input from minibuffer ,
and provide a default value at the same time so he can just enter to accept?
1 Answer
(string-to-char
(read-string "Char (or the first char of your input string): "
nil nil
;; Default:
"👀"))
If you use functions like read-char
, it will be difficult to distinguish between the default value and the keystroke of <return>
. (You cannot use C-q
, because it just issues the char ?\C-q
.