[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keypresses
- To: robby+@CMU.EDU
- Subject: Re: keypresses
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Mon, 17 Jan 1994 10:12:44 -0500
- Cc: info-mcl@cambridge.apple.com
On Sun Jan 16, Robert Bruce Findler writes:
I've been having some problems with keypresses in my view-key-event-handler.
Specifically with #\end and #\home. control-d and control-a seem to be
bound to those keys, respectively and the end and home keys on the
keyboard just beep. I have one of the split keyboards, if that helps any.
I don't have an Apple Extended keyboard with function keys f1-f15, a
numeric keyppad, help, home, pageup/down, end, delete forward, and arrow
keys.
Try using the home and end keys within a fred window - they should send
you to the first and last line of the document. Here's code I
used in my application to recognize the keystrokes and perform actions.
Notice that #\Home and #\End are the values of the keystrokes for home
and end:
(defmethod view-key-event-handler ((self choice-window) char)
(select char
(#\BackArrow (prev-transform self))
(#\ForwardArrow (next-transform self))
(#\UpArrow (zoom-in self))
(#\DownArrow (zoom-out self))
(#\Home (first-transform self))
(#\PageUp (prev-transform self))
(#\PageDown (next-transform self))
(#\End (last-transform self))))
In microsoft word the control-a and control-d keys insert characters and
don't have the same effect as home and end.
mark