Xref: utzoo comp.emacs:5987 gnu.emacs:819 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc!csd4.milw.wisc.edu!lll-winken!uunet!littlei!omepd!merlyn From: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Newsgroups: comp.emacs,gnu.emacs Subject: see-chars for GNU Summary: code attached Keywords: GNU, Elisp Message-ID: <4362@omepd.UUCP> Date: 1 May 89 21:51:11 GMT Sender: news@omepd.UUCP Reply-To: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Organization: Stonehenge; netaccess via BiiN, Hillsboro, Oregon, USA Lines: 28 Ever wonder what characters a function key sends out, or one of those other "unknown" keys like "scroll right"? Well, even if you don't have one of those problems today, tuck this little goody away, 'cause it'll help you figure that out when the time comes. `see-chars' accepts *any* characters (including a C-g) until a three-second timeout has passed. It then tosses up a human-readable display of the characters entered. /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095===\ { on contract to BiiN, Hillsboro, Oregon, USA, until 30 May 1989 } { ...!uunet!tektronix!biin!merlyn } { or try after 30 May 1989 } \=Cute quote: "Welcome to Oregon... home of the California Raisins!"=/ ================================================== snip snip ========== ;;; original by merlyn -- LastEditDate = "Mon Apr 10 15:45:46 1989" (defun see-chars () "Displays characters typed, terminated by a 3-second timeout." (interactive) (let ((chars "") (inhibit-quit t)) (message "Enter characters, terminated by 3-second timeout...") (while (not (sit-for 3)) (setq chars (concat chars (list (read-char))) quit-flag nil)) ; quit-flag maybe set by C-g (message "Characters entered: %s" (key-description chars))))