[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Escape as Meta prefix
- To: email@example.com
- Subject: Escape as Meta prefix
- From: <firstname.lastname@example.org>
- Date: Sat, 9 Jun 90 16:04:51 PDT
Here's a small contribution to the info-macl library. People who learned
EMACS on terminals without real Meta keys might find it useful.
---------------------- Cut Here -------------------
;;; for use with MACL 1.3.2.
;;; This code is in the public domain. Use it as you wish.
;;; Stephen E. Miner (email@example.com)
;;; Loading this file causes FRED Windows to use the Escape key as a Meta
;;; prefix (like usings EMACS on a VT100 terminal.) Of course, the normal
;;; Option key still works as a "real" Meta key.
(eval-when (compile eval)
(defconstant option-key-mask #x800 "Option key bit in the event.modifiers
(defobfun (sem-meta-prefix *fred-window*) ()
"Treats the current keystroke as if the META key were down."
(setq *fred-keystroke-hook* nil)
(rref *current-event* :Event.message)
(rref *current-event* :Event.modifiers))))))
(defobfun (sem-escape-key *fred-window*) ()
"Treats the current keystroke as a META prefix. The next keystroke will be
treated as if the META key were held down. This function is normally bound to
the ESCAPE key."
(setq *fred-keystroke-hook* 'sem-meta-prefix)
(def-fred-command #\escape sem-escape-key)