GNU bug report logs -
#4909
23.1.50; in emacs -nw `read-char' should return with error when an event is entered.
Previous Next
Full log
View this message in rfc822 format
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
> However `read-key' do the right thing, but is not usable in lesser emacs
> versions.
> So i have to use this function to replace `read-key' in not emacs-cvs:
>
> ,----
> | (defun traverse-read-char-or-event (prompt)
> | "Use `read-char' to read keyboard input, if input is not a char use `read-event' instead."
> | (let* ((chr (condition-case nil (read-char prompt) (error nil)))
> | (evt (unless chr (read-event))))
> | (or chr evt)))
> `----
>
> And i lost the ability of using arrow keys in an emacs -nw because
> `read-char' and `read-event' return the wrong thing.
> However C-n and C-p work fine.
(I'm going through old bug reports that unfortunately got little response at
the time.)
I'm not sure I quite understand this bug report -- read-event/key seems
to return the values described, but the arrow keys work fine for me in
Emacs 28 with -nw (on Debian/bullseye).
So is this a problem that has gone away in the years since this was
reported, or do you still see these issues?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.